* libgcj testsuite FAILs on Ubuntu
@ 2009-08-05 10:58 Andrew Haley
2009-08-05 11:08 ` Matthias Klose
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Haley @ 2009-08-05 10:58 UTC (permalink / raw)
To: Matthias Klose; +Cc: java
There is a number of gcj stacktrace failures on Ubuntu ARM.
They all look like this:
StackTrace2$Inner.doCrash:FAIL - expected 33, got: 0, in file crtstuff.c
StackTrace2$Inner.foo:FAIL - expected 28, got: 0, in file crtstuff.c
StackTrace2.a:FAIL - expected 21, got: 0, in file crtstuff.c
StackTrace2.main:FAIL - expected 10, got: 0, in file crtstuff.c
A simple test reveals that dladdr() doesn't work:
#define _GNU_SOURCE
#include <stdio.h>
#include <dlfcn.h>
void dosym(const char *s, void *p)
{
Dl_info addr_info;
int success = dladdr (p, &addr_info);
if (success)
{
fprintf (stdout, "%s=%p\n", s, p);
fprintf (stdout, "%s is at %p,\n",
addr_info.dli_sname, addr_info.dli_fbase);
}
}
void main()
{
dosym ("printf", (void*)printf);
dosym ("open", (void*)fopen);
}
aph@babbage-aph:~$ gcc test_dladdr.c -g -ldl
aph@babbage-aph:~$ ./a.out
printf=0x83f0
printf is at 0x8000,
open=0x83e4
fopen is at 0x8000,
This is:
Distributor ID: Ubuntu
Description: Ubuntu jaunty (development branch)
Release: 9.04
I don't know how something as fundamental as dladdr() can possibly
fail and the system still appear to work, but there it is.
Andrew.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libgcj testsuite FAILs on Ubuntu
2009-08-05 10:58 libgcj testsuite FAILs on Ubuntu Andrew Haley
@ 2009-08-05 11:08 ` Matthias Klose
2009-08-05 11:12 ` Andrew Haley
0 siblings, 1 reply; 5+ messages in thread
From: Matthias Klose @ 2009-08-05 11:08 UTC (permalink / raw)
To: Andrew Haley; +Cc: java
On 05.08.2009 12:58, Andrew Haley wrote:
> There is a number of gcj stacktrace failures on Ubuntu ARM.
>
> They all look like this:
>
> StackTrace2$Inner.doCrash:FAIL - expected 33, got: 0, in file crtstuff.c
> StackTrace2$Inner.foo:FAIL - expected 28, got: 0, in file crtstuff.c
> StackTrace2.a:FAIL - expected 21, got: 0, in file crtstuff.c
> StackTrace2.main:FAIL - expected 10, got: 0, in file crtstuff.c
[...]
> This is:
>
> Distributor ID: Ubuntu
> Description: Ubuntu jaunty (development branch)
> Release: 9.04
>
> I don't know how something as fundamental as dladdr() can possibly
> fail and the system still appear to work, but there it is.
Same on Debian, I don't see any difference in the failing testcase on Debian
unstable (search for test-summary):
https://buildd.debian.org/fetch.cgi?&pkg=gcj-4.4&ver=4.4.1-1&arch=armel&stamp=1248466701&file=log
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libgcj testsuite FAILs on Ubuntu
2009-08-05 11:08 ` Matthias Klose
@ 2009-08-05 11:12 ` Andrew Haley
2009-08-05 13:07 ` Andrew Haley
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Haley @ 2009-08-05 11:12 UTC (permalink / raw)
To: Matthias Klose; +Cc: java
Matthias Klose wrote:
> On 05.08.2009 12:58, Andrew Haley wrote:
>> There is a number of gcj stacktrace failures on Ubuntu ARM.
>>
>> They all look like this:
>>
>> StackTrace2$Inner.doCrash:FAIL - expected 33, got: 0, in file crtstuff.c
>> StackTrace2$Inner.foo:FAIL - expected 28, got: 0, in file crtstuff.c
>> StackTrace2.a:FAIL - expected 21, got: 0, in file crtstuff.c
>> StackTrace2.main:FAIL - expected 10, got: 0, in file crtstuff.c
>
> [...]
>
>> This is:
>>
>> Distributor ID: Ubuntu
>> Description: Ubuntu jaunty (development branch)
>> Release: 9.04
>>
>> I don't know how something as fundamental as dladdr() can possibly
>> fail and the system still appear to work, but there it is.
>
> Same on Debian, I don't see any difference in the failing testcase on
> Debian unstable (search for test-summary):
> https://buildd.debian.org/fetch.cgi?&pkg=gcj-4.4&ver=4.4.1-1&arch=armel&stamp=1248466701&file=log
Sorry, I just remembered that this test gets the PLT address, not the
address of the function. I'm cooking up a better test case.
Andrew.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libgcj testsuite FAILs on Ubuntu
2009-08-05 11:12 ` Andrew Haley
@ 2009-08-05 13:07 ` Andrew Haley
2009-08-05 13:50 ` Andrew Haley
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Haley @ 2009-08-05 13:07 UTC (permalink / raw)
To: Matthias Klose; +Cc: java
OK, sorry for the noise, I think I've found the real problem.
Run nm on StackTrace2.exe, find the address of StackTrace2::main, and use
addr2line to get the line number:
$ nm ./testsuite/StackTrace2.exe | grep 'StackTrace2.*main' | awk '{print $1}' | addr2line -e ./testsuite/StackTrace2.exe
BFD: Dwarf Error: mangled line number section.
crtstuff.c:0
On a non-broken x86_64 system:
$ nm ./testsuite/StackTrace2.exe | grep 'StackTrace2.*main' | awk '{print $1}' | addr2line -e ./testsuite/StackTrace2.exe
/home/aph/gcc/trunk/obj-x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/libjava/StackTrace2.java:10
In general, I have found a great many errors with debuginfo. It would be
interesting to know if any gdb tests pass.
Andrew.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: libgcj testsuite FAILs on Ubuntu
2009-08-05 13:07 ` Andrew Haley
@ 2009-08-05 13:50 ` Andrew Haley
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Haley @ 2009-08-05 13:50 UTC (permalink / raw)
To: Matthias Klose; +Cc: java
Andrew Haley wrote:
> OK, sorry for the noise, I think I've found the real problem.
>
> Run nm on StackTrace2.exe, find the address of StackTrace2::main, and use
> addr2line to get the line number:
>
> $ nm ./testsuite/StackTrace2.exe | grep 'StackTrace2.*main' | awk '{print $1}' | addr2line -e ./testsuite/StackTrace2.exe
> BFD: Dwarf Error: mangled line number section.
> crtstuff.c:0
>
> On a non-broken x86_64 system:
>
> $ nm ./testsuite/StackTrace2.exe | grep 'StackTrace2.*main' | awk '{print $1}' | addr2line -e ./testsuite/StackTrace2.exe
> /home/aph/gcc/trunk/obj-x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/libjava/StackTrace2.java:10
>
> In general, I have found a great many errors with debuginfo. It would be
> interesting to know if any gdb tests pass.
binutils 2.19.51.20090805-1ubuntu1 fixes this. The test runs correctly.
Andrew.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-05 13:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-05 10:58 libgcj testsuite FAILs on Ubuntu Andrew Haley
2009-08-05 11:08 ` Matthias Klose
2009-08-05 11:12 ` Andrew Haley
2009-08-05 13:07 ` Andrew Haley
2009-08-05 13:50 ` Andrew Haley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).