gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) run my code will coredump. valgrind message is :
==14892== Invalid free() / delete / delete[] / realloc()
==14892== at 0x4C2B343: operator delete(void*) (vg_replace_malloc.c:502)
==14892== by 0x53404DE: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
==14892== by 0x5AE2258: __run_exit_handlers (exit.c:82)
==14892== by 0x5AE22A4: exit (exit.c:104)
==14892== by 0x5AC7ECB: (below main) (libc-start.c:321)
==14892== Address 0x55892e8 is in the BSS segment of /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
when i use gcc version 4.7.2 20121015 (Red Hat 4.7.2-5) (GCC), it won't coredump. is this a bug of gcc?
Aucun commentaire:
Enregistrer un commentaire