This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/46729] New: Many 32-bit 30_threads execution tests fail on Solaris 10+/SPARC with as
- From: "ro at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Nov 2010 18:05:40 +0000
- Subject: [Bug target/46729] New: Many 32-bit 30_threads execution tests fail on Solaris 10+/SPARC with as
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46729
Summary: Many 32-bit 30_threads execution tests fail on Solaris
10+/SPARC with as
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ro@gcc.gnu.org
CC: ebotcazou@gcc.gnu.org
Host: sparc-sun-solaris2.1[01]
Target: sparc-sun-solaris2.1[01]
Build: sparc-sun-solaris2.1[01]
Many 32-bit 30_threads libstdc++ execution tests fail on Solaris 10 and
11/SPARC
with Sun as. An example is
FAIL: 30_threads/async/42819.cc execution test
The test SEGVs like this:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0x00019f40 in __gthread_active_p (this=0x2be28)
at
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/include/sparc-sun-solaris2.10/bits/gthr-default.h:216
216 if (__builtin_expect (__gthread_active_latest_value < 0, 0))
(gdb) where
#0 0x00019f40 in __gthread_active_p (this=0x2be28)
at
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/include/sparc-sun-solaris2.10/bits/gthr-default.h:216
#1 __gthread_once (this=0x2be28)
at
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/include/sparc-sun-solaris2.10/bits/gthr-default.h:725
#2 call_once<std::_Mem_fn<void
(std::__future_base::_State::*)(std::function<std::unique_ptr<std::__future_base::_Result_base,
std::__future_base::_Result_base::_Deleter>()>&, bool&)>,
std::__future_base::_State* const,
std::reference_wrapper<std::function<std::unique_ptr<std::__future_base::_Result_base,
std::__future_base::_Result_base::_Deleter>()> >, std::reference_wrapper<bool>
> (
this=0x2be28)
at
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/include/mutex:733
#3
std::__future_base::_State::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base,
std::__future_base::_Result_base::_Deleter> ()()>, bool) (this=0x2be28)
at
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/include/future:313
#4 std::__future_base::_Deferred_state<int>::_M_run_deferred (this=0x2be28)
at
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/include/future:1295
#5 0x000171fc in std::__future_base::_State::wait (value=1)
at
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/include/future:281
#6 std::__basic_future<int>::_M_get_result (value=1)
at
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/include/future:515
#7 std::future<int>::get (value=1)
at
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/include/future:594
#8 work1 (value=1)
at
/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/30_threads/async/42819.cc:36
#9 0x00019acc in test01 ()
at
/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/30_threads/async/42819.cc:51
#10 0x00019b3c in main ()
at
/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/30_threads/async/42819.cc:57
(gdb) display/i $pc
1: x/i $pc
=> 0x19f40 <_ZNSt13__future_base15_Deferred_stateIiE15_M_run_deferredEv+340>:
st %g2, [ %g3 ]
(gdb) p/x $g2
$4 = 0x154c8
(gdb) p/x $g3
$5 = 0x10b52a40
As can be seen with pmap, %g3 isn't mapped:
ro@yoda 2243 > pmap 5431
5431: /var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++
00010000 48K r-x--
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/testsuite/42819.exe
0002A000 8K rwx--
/var/gcc/regression/trunk/10-gcc/build/sparc-sun-solaris2.10/libstdc++-v3/testsuite/42819.exe
0002C000 16K rwx-- [ heap ]
FE800000 1216K r-x-- /lib/libc.so.1
There is no problem with GNU as.