This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58822] Segfault when calling make_shared
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Apr 2016 07:16:00 +0000
- Subject: [Bug c++/58822] Segfault when calling make_shared
- Auto-submitted: auto-generated
- References: <bug-58822-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58822
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |INVALID
--- Comment #28 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If you compile it with -fsanitize=undefined then at runtime you get:
/usr/include/c++/4.8/ext/new_allocator.h:120:4: runtime error: cast to virtual
base of address 0x0000013d1ca0 which does not point to an object of type
'InvalidArgumentException'
0x0000013d1ca0: note: object has invalid vptr
00 00 00 00 00 00 00 00 00 00 00 00 31 00 00 00 00 00 00 00 06 00 00 00 00
00 00 00 06 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
invalid vptr