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/59258] usan: ICE(segfault): stack-buffer-overflow with -fsanitize=undefined


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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #2)
> Seems to work for the reduced test case but not for the big code - also
> -fsanitize=addr can only detect a segfault. Hopefully, it can be reduced to
> something small. Currently, it looks as if it could be a similar kind of
> bug, which makes reducing difficult.

Still not much success with reducing (~90 kB), but it seems to be due to
-fsanitize=null.


Except for staring at the -fsanitize=null code, I don't have any good idea how
to debug this - valgrind and an -fsanitized=address instrumented GCC don't
help.

Do you have any suggestion?

BTW: The 90kB code fails due to with a segfault for "cc1plus -fsanitize=null
-Og -fsanitize=address" with

0x0000000000e7a877 in resolve_addr_in_expr (loc=0xb60f7fff8000c181) at
../../gcc/dwarf2out.c:22974
22974       switch (loc->dw_loc_opc)
#1  0x0000000000e7c209 in resolve_addr (die=0x7ffff2704c80) at
../../gcc/dwarf2out.c:23203
23203                   if (!resolve_addr_in_expr ((*curr)->expr))

(gdb) p *loc
Cannot access memory at address 0xb60f7fff8000c181


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