Date: Fri, 19 Feb 2016 19:19:20 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 207359] projects/clang380-import for TARGET_ARCH=powerpc64 via powerpc64-gcc : c++ exceptions unbounded loop in _Unwind_RaiseException (9 line program) Message-ID: <bug-207359-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207359 Bug ID: 207359 Summary: projects/clang380-import for TARGET_ARCH=3Dpowerpc64 via powerpc64-gcc : c++ exceptions unbounded loop in _Unwind_RaiseException (9 line program) Product: Base System Version: 11.0-CURRENT Hardware: ppc OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: markmi@dsl-only.net >From a buildworld/buildkernel install for TARGET_ARCH=3Dpowerpc64 based on powerpc64-xtoolchain-gcc/powerpc64-gcc form projects/clang380-import -r2056= 01. . . #include <exception> int main(void) { try { throw std::exception(); } catch (std::exception& e) {} // same result without & return 0; } (This simplifies what I found in trying to use "kyua test -k /usr/tests/Kyuafile", which does not progress but uses 100% of a cpu/oore.) # g++ --version g++ (FreeBSD Ports Collection for powerpc64) 5.3.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # g++ -I /usr/include/c++/v1/ -L /usr/lib/ -g -Wall -pedantic exception_test.cpp ./a.out never finishes. from gdb: Program received signal SIGINT, Interrupt. 0x000000005002a088 in .__sys_sigprocmask () from /libexec/ld-elf.so.1 (gdb) bt #0 0x000000005002a088 in .__sys_sigprocmask () from /libexec/ld-elf.so.1 #1 0x0000000050029c1c in sigprocmask (how=3D0, set=3D0x500493a4 <oldsigmas= k>, oset=3D0x0) at /usr/src/lib/libc/sys/sigprocmask.c:48 #2 0x0000000050022d98 in def_lock_release (lock=3D<optimized out>) at /usr/src/libexec/rtld-elf/rtld_lock.c:141 #3 0x0000000050023028 in lock_release (lock=3D0x500496a8 <rtld_locks+32>, lockstate=3D<optimized out>) at /usr/src/libexec/rtld-elf/rtld_lock.c:234 #4 0x000000005001ddac in dl_iterate_phdr (callback=3D@0x501e1b50: 0x501ce3= 50 <_Unwind_IteratePhdrCallback>, param=3D0xffffffffffffc210) at /usr/src/libexec/rtld-elf/rtld.c:3544 #5 0x00000000501cf33c in _Unwind_Find_FDE (pc=3D0x5016e39f <throw_exception(__cxxabiv1::__cxa_exception*)+143>, bases=3D0xffffffffffff= d1d8) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2-fde-glibc.c:= 420 #6 0x00000000501ca9e0 in uw_frame_state_for (context=3Dcontext@entry=3D0xffffffffffffcd30, fs=3Dfs@entry=3D0xffffffffff= ffc3b0) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:1106 #7 0x00000000501cb968 in _Unwind_RaiseException (exc=3D0x50815058) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind.inc:103 #8 0x000000005016e3a0 in throw_exception (ex=3D0x50815000) at /usr/src/lib/libcxxrt/../../contrib/libcxxrt/exception.cc:751 #9 0x0000000010000d50 in main () at exception_test.cpp:5 . . . repeated finish commands until . . . (gdb) finish Run till exit from #0 _Unwind_RaiseException (exc=3D0x50815058) at /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind.inc:117 ^C Program received signal SIGINT, Interrupt. 0x000000005002a088 in .__sys_sigprocmask () from /libexec/ld-elf.so.1 _Unwind_RaiseException never returns. kyua did the same thing but is a more complicated context. Using g++49's a.out gets the same result for: # g++49 -I /usr/include/c++/v1/ -L /usr/lib/ -g -Wall -pedantic exception_test.cpp=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 But the a.out works fine for: # g++49 -g -Wall -pedantic exception_test.cpp # ./a.out #=20 The difference is the headers/libraries involved. (powerpc64-gcc cannot be used that way: it has a freestanding status and the include path and libraries path need to be supplied.) (clang 3.8.0 is not up to doing a buildworld. For example: it does not supp= ort soft float yet, at least last checked. This is part of why I test the provi= ded (ports) cross compile environment for powerpc64 [but in a self-hosted form]= .) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-207359-8>
