C++ bug due to overlapping temporary stack slots
Mark Mitchell
mark@codesourcery.com
Wed Apr 21 19:05:00 GMT 2004
Ulrich Weigand wrote:
>Hello,
>
>the testcase appended below triggers the abort,
>because two temporaries that are concurrently
>used get assigned the same stack slot; thus the
>constructor of the 'pointer' temporary built
>inside the 'element' destructor will clobber
>the 'canary' member of the current 'element'.
>
>To reproduce, build the file with -O (both
>-O0 and -O2 work correctly).
>
>Any suggestions how to fix (or further debug)
>this problem?
>
Please make sure this is in bugzilla, targeted at 3.4.1.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com
More information about the Gcc
mailing list