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

            Bug ID: 61799
           Summary: [4.6/4.7 regression][ia64] r165240 caused GDB stops
                    with SIGTRAP at 0 address
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: emeric.maschino at gmail dot com

With current ia64 stable GCC (4.6 on Debian/ia64, 4.7 on Gentoo/ia64), trying
to debug a program with GDB immediately ends with:

(gdb) run
Starting program: /usr/bin/bogus-program 

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0000000000000000 in ?? ()
(gdb)

Originally incorrectly reported on Debian BTS against the Linux kernel (as
depending on kernel versions, GDB was running fine or not) [1], I've later
discovered that, for a given kernel version, GDB was running fine or not
depending on the kernel configuration (simply changing a component from being
compiled in-kernel vs. as a module could trigger this issue) [2]. So kernel
version wasn't the cause. GCC optimizations were also incorrectly reported as
playing a role there [3], as depending on optimization settings, GDB may run
fine or not. This lead to Ben Hutchings reporting on the behalf of Will Deacon
that "gcc's code generation for ia64 has regressed in 4.6 or earlier" [4]. So,
carefully looking again at the broken kernels, I've indeed noticed that this
issue first appears with kernels compiled with GCC >= 4.6, as alluded to
earlier by Stephan Schreiber [5].

So, having a working environment with a GCC 4.5.4-compiled kernel and a broken
one with the same kernel but compiled with GCC 4.6.3, I ran git bisect on GCC's
git mirror and located the bad commit to be revision 165240 [6], that aimed to
fix PR/rtl-opt/33721 [7].

Not being a GCC developper nor an ia64 guru, I'm now stuck here. So please let
me know how I can help further.

Thanks,

     Émeric


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691576
[2] https://lists.debian.org/debian-ia64/2013/09/msg00024.html
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691576#131
[4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691576#116
[5] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691576#10
[6] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=165240
[7] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33721

Reply via email to