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 sanitizer/61071] Compiling with AddressSanitizer with 4.9 breaks printng some variables in gdb


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61071

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-05-22
                 CC|                            |aoliva at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--param asan-use-after-return=0 makes this work, without that in order to
support use after return the variables don't live in stack frame
(unconditionally), so are based on some pointer (which is assigned either a
stack slot address or return value from libasan function), and as -O0 -g
doesn't perform var-tracking, it then really depends on register allocation, if
the pseudo register holding that pointer is assigned some hard register through
the whole function (that is the case with t[36] apparently), or not.
For -O0 to have this working reliably, supposedly we'd have to store that
pointer into the stack and turning it into an artificial var, then add
DECL_VALUE_EXPR for all the other stack vars if they are based on this pointer
(Alex, any other thoughts?).
For -O1+/-Og/-Os, I'm surprised var-tracking doesn't handle this.


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