------- Comment #18 from doko at ubuntu dot com 2010-03-16 23:30 -------
rebuilding binutils 2.20.1 with the patch from comment #17 shows one
regression:
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100316233021.11423.qmail@sourceware.org">http://lists.debian.org/20100316233021.11423.qmail@sourceware.org
03-16-2010, 10:39 PM
"mikpe at it dot uu dot se"
regressions in libjava testsuite on arm-linux
------- Comment #19 from mikpe at it dot uu dot se 2010-03-16 23:39 -------
(In reply to comment #18)
> rebuilding binutils 2.20.1 with the patch from comment #17 shows one
> regression:
>
> Running /home/doko/binutils/binutils-2.20.1/ld/testsuite/ld-arm/arm-elf.exp ...
> FAIL: ld-arm/unwind-4
I guess I should've run the binutils testsuite first. (Looking..) Ah, but that
failure is Ok, as it's checking for the merging that the patch disabled.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40860
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100316233902.13523.qmail@sourceware.org">http://lists.debian.org/20100316233902.13523.qmail@sourceware.org
03-17-2010, 09:51 AM
"doko at ubuntu dot com"
regressions in libjava testsuite on arm-linux
------- Comment #20 from doko at ubuntu dot com 2010-03-17 10:51 -------
no change in the libjava testsuite when built with these binutils
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40860
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100317105117.1551.qmail@sourceware.org">http://lists.debian.org/20100317105117.1551.qmail@sourceware.org
03-17-2010, 08:13 PM
"mikpe at it dot uu dot se"
regressions in libjava testsuite on arm-linux
------- Comment #21 from mikpe at it dot uu dot se 2010-03-17 21:13 -------
(In reply to comment #20)
> no change in the libjava testsuite when built with these binutils
But that's still thumb not arm like in comment #16? All my results are from
plain arm (armv5tel) builds.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40860
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100317211331.29565.qmail@sourceware.org">http://lists.debian.org/20100317211331.29565.qmail@sourceware.org
03-17-2010, 08:23 PM
"mikpe at it dot uu dot se"
regressions in libjava testsuite on arm-linux
------- Comment #22 from mikpe at it dot uu dot se 2010-03-17 21:23 -------
I did another binutils experiment. I reverted my patch to disable general
merging of table entries, and instead disabled generating new and merging
cantunwind entries. With that binutils libjava regressed just like with vanilla
post-2.19.1 binutils. The general merging bit seems to be the problem.
+#if 0
/* Insert an EXIDX_CANTUNWIND marker at the end of a section. */
static void
insert_cantunwind_after(asection *text_sec, asection *exidx_sec)
@@ -9162,6 +9163,7 @@ insert_cantunwind_after(asection *text_s
adjust_exidx_size(exidx_sec, 8);
}
+#endif
/* Scan .ARM.exidx tables, and create a list describing edits which should be
made to those tables, such that:
@@ -9248,7 +9250,9 @@ elf32_arm_fix_exidx_coverage (asection *
if (sec->size == 0)
continue;
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100317212343.3347.qmail@sourceware.org">http://lists.debian.org/20100317212343.3347.qmail@sourceware.org
03-19-2010, 10:20 PM
"mikpe at it dot uu dot se"
regressions in libjava testsuite on arm-linux
------- Comment #23 from mikpe at it dot uu dot se 2010-03-19 23:20 -------
While working on another debugging patch I noticed something that I think might
explain the libjava regressions, especially the stack trace ones.
The binutils change breaks _Unwind_GetRegionStart().
Example: We have three functions, f1() starts at address 100 and is 20 bytes,
f2() starts at address 120 and is 10 bytes, and f3() starts at address 130.
f1() and f2() got the same inlined unwind table data U1, while f3() got some
different unwind table data U3.
A pre-binutils-2.20 .ARM.exidx table for this program would be
binutils-2.20 and later merge entry [1] with entry [0] since they are adjacent
and have the same unwind table data, producing a final .ARM.exidx table:
[0] = { 100, U1 }, [1] = { 130, U3 }, ...
So an exception in or unwind through f2() will now return { 100, U1 } rather
than { 120, U1 }.
The first thing that happens with the found table entry is that the function
start address is stashed away (unwind-arm.c:get_eit_entry(), the assignment to
ucbp->pr_cache.fnstart). Then __gnu_unwind_pr_common() uses fnstart while
interpreting the unwind table data; I haven't studied that code but since
libstdc++ test cases don't regress I assume the incorrect fnstart doesn't
matter for inlined unwind table data.
However, pr-support.c:_Unwind_GetRegionStart() also uses fnstart, so users of
_Unwind_GetRegionStart() will see f1() not f2() for exceptions in or unwinds
through f2(). In particular, libjava/stacktrace.cc looks like it will construct
bogus stack traces (see its uses of 'start_ip').
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40860
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100319232035.26511.qmail@sourceware.org">http://lists.debian.org/20100319232035.26511.qmail@sourceware.org
03-20-2010, 05:54 PM
"ramana at gcc dot gnu dot org"
regressions in libjava testsuite on arm-linux
------- Comment #24 from ramana at gcc dot gnu dot org 2010-03-20 18:54 -------
This rings a bell and the comment in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29206#c8
is probably related.
If so, this is essentially a dup of PR29206 and I'm not sure what more we can
do with this.
cheers
Ramana
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40860
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100320185445.11969.qmail@sourceware.org">http://lists.debian.org/20100320185445.11969.qmail@sourceware.org
03-20-2010, 09:10 PM
"mikpe at it dot uu dot se"
regressions in libjava testsuite on arm-linux
------- Comment #25 from mikpe at it dot uu dot se 2010-03-20 22:10 -------
(In reply to comment #24)
> This rings a bell and the comment in
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29206#c8
> is probably related.
I don't think this is at all the same as PR29206. PR29206 is very old now, so I
don't think the one comment about EABI is accurate now, and people have been
using EABI java builds succesfully. The test case given (gcj-dbtool -n) works
for me. If anything, I suspect that maybe the ARM unwinder loops at end of
stack bug is at play; for java at least there's a patch in Debian to work
around that (I use it in my toolchain too).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40860
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100320221011.30959.qmail@sourceware.org">http://lists.debian.org/20100320221011.30959.qmail@sourceware.org
03-20-2010, 09:36 PM
"mikpe at it dot uu dot se"
regressions in libjava testsuite on arm-linux
------- Comment #26 from mikpe at it dot uu dot se 2010-03-20 22:36 -------
Created an attachment (id=20147)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20147&action=view)
test program to take a stack trace using _Unwind_ API
I'm attaching a test program which sets up a predictable call chain, and then
uses _Unwind_Backtrace() and _Unwind_GetRegionStart() to get the entry points
of the functions in the call chain into an array. It prints the corresponding
function names and verifies that the function entry points are correct.
With gcc-4.4.3 and binutils-2.19.1 on armv5tel-unknown-linux-gnueabi this works
fine:
> gcc -funwind-tables -fno-unit-at-a-time -O -o stacktrace-2.19.1 stacktrace.c
> ./stacktrace-2.19.1
bar
f2
main
With the same gcc binary but binutils-20100316 the program fails:
> PATH=/tmp/binutils-2.20.51-install/bin:$PATH gcc -funwind-tables -fno-unit-at-a-time -O stacktrace.c -o stacktrace-2.20.51
> ./stacktrace-2.20.51
bar
f1
f1
Abort
The reason for the failure is that ld merged the .ARM.exidx entries for f2 and
main with the one for f1, which breaks _Unwind_GetRegionStart(). First we see
that f1, f2, and main are adjacent in memory:
> nm -v stacktrace-2.20.51
...
00008588 T tracefn
000085bc T bar
0000865c T f1
0000866c T f2
0000867c T main
00008698 T __libc_csu_fini
...
With binutils-2.19.1 they each get their own .ARM.exidx entry:
Unwind table index '.ARM.exidx' at offset 0x778 contains 6 entries:
0x845c <_start>: 0x1 [cantunwind]
0x8508 <printf_fn>: 0x80a8b0b0
Compact model 0
0xa8 pop {r4r14}
0xb0 finish
0xb0 finish
0x8588 <tracefn>: 0x80aab0b0
Compact model 0
0xaa pop {r4, r5, r6r14}
0xb0 finish
0xb0 finish
0x85bc <bar>: 0x8003a8b0
Compact model 0
0x03 vsp = vsp + 16
0xa8 pop {r4r14}
0xb0 finish
0x865c <f1>: 0x80a8b0b0
Compact model 0
0xa8 pop {r4r14}
0xb0 finish
0xb0 finish
0x8698 <__libc_csu_fini>: 0x1 [cantunwind]
This test program also works on i686-linux, sparc64-linux -m32/-m64, and
powerpc64-linux -m32.
I understand the benefits of shrinking .ARM.exidx tables, but it does break
parts of gcc's <unwind.h> implementation (and thus libjava), so should be
opt-in via an explicit option and not done by default.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40860
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100320223620.5783.qmail@sourceware.org">http://lists.debian.org/20100320223620.5783.qmail@sourceware.org
03-22-2010, 01:15 PM
"mgretton at sourceware dot org"
regressions in libjava testsuite on arm-linux
--
mgretton at sourceware dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mgretton at sourceware dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40860
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100322141559.14514.qmail@sourceware.org">http://lists.debian.org/20100322141559.14514.qmail@sourceware.org