[Bug c++/11091] Wrong code in variable initialization
dej@inode.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 4 20:22:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11091
dej@inode.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
------- Additional Comments From dej@inode.org 2003-06-04 20:22 -------
Although it may not be apparent from the test case I provided, there IS a bug here.
The intent of the constructor is to zero the smart pointer. If I step through my
production code with GDB, I see that the pointer is not zeroed. Furthermore, code that
depends on it being zero breaks.
The constructor code shown stores a zero into the pointer address pushed onto the stack.
As the code currently is generated, this will have the effect of CLOBBERING some random
memory location. I have confirmed this in GDB.
I am reluctant to upload the full source code base as it is part of a commercial project.
I will attach a log from GDB showing how the location addressed by the previous contents
of the variable gets clobbered.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the Gcc-bugs
mailing list