This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11091] Wrong code in variable initialization


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]