http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48384
--- Comment #2 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-03-31 10:39:36 UTC --- Thanks, at least on some system it seems to behave correclty. I had to rebuild binutil to enable the plugin and something may have gone wrong are you using standard bfd "ld" or gold? vincenzo On 31 Mar, 2011, at 12:28 PM, rguenth at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48384 > > --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-31 > 10:28:07 UTC --- > Hm. I get > >> LD_LIBRARY_PATH=. gdb ./t_hltog > GNU gdb (GDB) SUSE (7.2.50.20110206-67.1) > ... > Program received signal SIGSEGV, Segmentation fault. > 0x00007ffff7ff87eb in foo (h=0x0) at foo.cc:6 > 6 return *h +1; > (gdb) bt > #0 0x00007ffff7ff87eb in foo (h=0x0) at foo.cc:6 > #1 0x00007ffff7ff8709 in go (j=2001, h=0x0) at go.cc:5 > #2 0x000000000040063d in main (argc=1) at main.cc:7 > >> LD_LIBRARY_PATH=. gdb ./t_hltog2 > GNU gdb (GDB) SUSE (7.2.50.20110206-67.1) > ... > Program received signal SIGSEGV, Segmentation fault. > go (j=Cannot access memory at address 0x0 > ) at go.cc:5 > 5 j+= foo(h); > (gdb) bt > #0 go (j=Cannot access memory at address 0x0 > ) at go.cc:5 > #1 0x000000000040062d in main (argc=<optimized out>) at main.cc:7 > >> LD_LIBRARY_PATH=. gdb ./t_hlto > GNU gdb (GDB) SUSE (7.2.50.20110206-67.1) > ... > Program received signal SIGSEGV, Segmentation fault. > 0x00007ffff7ff874b in go(int, int const*) () from ./libfoo_hlto.so > (gdb) bt > #0 0x00007ffff7ff874b in go(int, int const*) () from ./libfoo_hlto.so > #1 0x000000000040062d in main () > > > which looks reasonable. > > As I can't reproduce the issue at hand I didn't try to investigate > what debuginfo parts may be off. The assembly of the shared library > shows that foo is inlined into go which appearantly didn't happen for > you? I don't have any foo symbol in the shared library. So maybe > gdb is confused by bogus debug information about inlines. > > -- > Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You reported the bug. -- Il est bon de suivre sa pente, pourvu que ce soit en montant. A.G. http://www.flickr.com/photos/vin60/1320965757/