[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [csmith-bugs] Git version: function returning address of parameter
I think whether parameter passing constitutes a "read by an lvalue
expression" is debatable. But I recognize this is a Csmith problem and will
fix it soon.
> Anyway, the .tar.gz file is still the aforementioned
> and it generated the attached program.
> I modified it only by inserting the line that contains "DANGLING CHECK".
> When I compile it as a little-endian 64-bit program with gcc, I get:
> DANGLING CHECK: &p_5:0x7fffaceb008c, returning:0x7fffaceb008c checksum
> = E94CCCEA
> We have had this discussion with John before, but I would argue that
> the result of func_4() to func_2() counts as "read[ing]" in:
> "The value of a pointer becomes indeterminate when the object it points to
> reaches the end of its lifetime. (6.2.4 §2)"
> "indeterminate value: either an unspecified value or a trap representation
> "Certain object representations need not represent a value of the object
> If the stored value of an object has such a representation and is read by
> lvalue expression that does not have
> character type, the behavior is undefined. [...] Such a
> is called a trap representation. (126.96.36.199 §5)."