This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11091] Wrong code in variable initialization
- From: "dej at inode dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jun 2003 20:22:46 -0000
- Subject: [Bug c++/11091] Wrong code in variable initialization
- References: <20030604194320.11091.dej@inode.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.