[Bug c++/53330] new() operator can return NULL on a zero-length allocation

kilobyte at angband dot pl gcc-bugzilla@gcc.gnu.org
Sat May 12 11:03:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53330

--- Comment #1 from Adam Borowski <kilobyte at angband dot pl> 2012-05-12 11:01:23 UTC ---
Correction: after testing with valgrind, the return value is indeed
uninitialized; the pointer in contructor-but-no-fields case happens to be
non-zero but is junk and will cause a crash when you try to free it.



More information about the Gcc-bugs mailing list