The "origin" portion of use-after-dtor reports on global variables looks
something like this:
#0 in __sanitizer_dtor_callback
#1 in MSanAtExitWrapper
#2 in __run_exit_handlers
...
# in __libc_start_main
There are 2 issues here:
1. There is no destructor frame. That's probably because
__sanitizer_dtor_callback is the last thing a destructor does, and it is
tail-called. We should suppress tail-call optimization in this case. This
affects both global and heap-allocated objects.
2. For globals it should be possible to print the variable name (and the
location of the global definition). There is no support for this in MSan
(because globals are almost always initialized); there is code in TSan that
does this and support in llvm-symbolizer.
3. I wonder how hard it would be to do the same for local (stack) variables.
Original issue reported on code.google.com by euge...@google.com on 21 Jul 2015 at 11:31
Original issue reported on code.google.com by
euge...@google.com
on 21 Jul 2015 at 11:31