Bug ID: 77631
           Summary: no symbols in backtrace shown by ASan when debug info
                    is split
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot
          Reporter: gcc-bugs at muelli dot
                CC: dodji at gcc dot, dvyukov at gcc dot,
                    jakub at gcc dot, kcc at gcc dot
  Target Milestone: ---

I'm using GCC 6.2 with Address Sanitizer.
When stripping debug info to separate files, gdb is able to load those nicely.
When ASan prints a stacktrace, however, no symbols are shown.

bash-4.3$ gdb gnome-calculator 
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gnome-calculator...Reading symbols from
(gdb) start
Temporary breakpoint 1 at 0x4129b9: file gnome-calculator.c, line 1162.
Starting program: /app/bin/gnome-calculator 
warning: Error disabling address space randomization: Operation not
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/".

Temporary breakpoint 1, main (argc=1, argv=0x7ffc23a33f78)
    at gnome-calculator.c:1162
1162            return calculator_main (argv, argc);
(gdb) l
1158    int main (int argc, char ** argv) {
1159    #if !GLIB_CHECK_VERSION (2,35,0)
1160            g_type_init ();
1161    #endif
1162            return calculator_main (argv, argc);
1163    }
1166    static void calculator_class_init (CalculatorClass * klass)
(gdb) n

(gnome-calculator:5): Gtk-WARNING **: Locale not supported by C
        Using the fallback 'C' locale.
==3==ERROR: AddressSanitizer: global-buffer-overflow on address
0x0000006c7eb0 at pc 0x00000041491e bp 0x7fff8ef07f50 sp 0x7fff8ef07f48
READ of size 8 at 0x0000006c7eb0 thread T0
    #0 0x41491d  (/app/bin/gnome-calculator+0x41491d)
    #1 0x413f36  (/app/bin/gnome-calculator+0x413f36)
    #2 0x4213da  (/app/bin/gnome-calculator+0x4213da)
    #3 0x4243ec  (/app/bin/gnome-calculator+0x4243ec)
    #4 0x42c59a in math_buttons_set_mode (/app/bin/gnome-
    #5 0x40de41  (/app/bin/gnome-calculator+0x40de41)
    #6 0x7f7d81e65783  (/lib/
    #7 0x7f7d81e7f5e7 in g_signal_emit_valist (/lib/libgobject-

I expected to see a nice stacktrace just like gdb would print it.

Reply via email to