Message ID | yddvcob60eu.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On 01/17/2012 04:07 AM, Rainer Orth wrote: > * The 32-bit failures on Solaris 8 to 10 have a different root cause: > _Unwind_Find_FDE returns NULL for an address in _ZGTtL2f1v (f1()). It > turns out that there are two copies of the unwinder in eh-1.exe: one > from libgcc_s.so.1, and another one from libgcc_eh.a. eh-1.o has a > reference to _Unwind_Resume (don't yet know why), which is resolved > from libgcc_eh.a. This doesn't happen on Solaris 11, which uses the > dl_iterate_phdr based unwinder, thus no __register_frame_info_bases. Er.. how did we get two copies? I don't think this change is correct, as it seems just as likely that we'd hit the same problem with real applications. This just seems like it's papering over the real problem. r~
Richard Henderson <rth@redhat.com> writes: > On 01/17/2012 04:07 AM, Rainer Orth wrote: >> * The 32-bit failures on Solaris 8 to 10 have a different root cause: >> _Unwind_Find_FDE returns NULL for an address in _ZGTtL2f1v (f1()). It >> turns out that there are two copies of the unwinder in eh-1.exe: one >> from libgcc_s.so.1, and another one from libgcc_eh.a. eh-1.o has a >> reference to _Unwind_Resume (don't yet know why), which is resolved >> from libgcc_eh.a. This doesn't happen on Solaris 11, which uses the >> dl_iterate_phdr based unwinder, thus no __register_frame_info_bases. > > Er.. how did we get two copies? The link line boils down to ld -o eh-1.exe crt1.o crti.o crtbegin.o eh-1.o -litm -lstdc++ -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh crtend.o crtn.o The eh-1.o reference to _Unwind_Resume drags in one copy of the unwinder from libgcc_eh.a, while libstdc++.so is linked against libgcc_s.so.1, providing another copy. > I don't think this change is correct, as it seems just as likely > that we'd hit the same problem with real applications. This just > seems like it's papering over the real problem. Quite possible. Rainer
On 01/25/2012 12:03 AM, Rainer Orth wrote: >> Er.. how did we get two copies? > > The link line boils down to > > ld -o eh-1.exe crt1.o crti.o crtbegin.o eh-1.o -litm -lstdc++ -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh crtend.o crtn.o > > The eh-1.o reference to _Unwind_Resume drags in one copy of the unwinder > from libgcc_eh.a, while libstdc++.so is linked against libgcc_s.so.1, > providing another copy. So... are we linking with the gcc binary, not the g++ binary? Because I thought -shared-libgcc is the default for C++. If this goes too far down a rat-hole, your original patch is ok. r~
Richard Henderson <rth@redhat.com> writes: >> The eh-1.o reference to _Unwind_Resume drags in one copy of the unwinder >> from libgcc_eh.a, while libstdc++.so is linked against libgcc_s.so.1, >> providing another copy. > > So... are we linking with the gcc binary, not the g++ binary? Right. This was just copied over from libgomp, like most of the libitm build and test framework. > Because I thought -shared-libgcc is the default for C++. Indeed: manually replacing xgcc with g++ in the link line fixes the test, and is certainly far better than a per-platform per-test workaround. I'll see what it takes to properly fix that. > If this goes too far down a rat-hole, your original patch is ok. Thanks. Rainer
# HG changeset patch # Parent b41d70648bc4d3ba4c7930a694c0100973a1ed01 Link eh-1.exe with -shared-libgcc on Solaris (PR libitm/51822) diff --git a/libitm/testsuite/libitm.c++/eh-1.C b/libitm/testsuite/libitm.c++/eh-1.C --- a/libitm/testsuite/libitm.c++/eh-1.C +++ b/libitm/testsuite/libitm.c++/eh-1.C @@ -1,4 +1,5 @@ // { dg-do run } +// { dg-options "-shared-libgcc" { target *-*-solaris2* } } extern "C" void abort ();