Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 2016 04:17:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 207325] projects/clang380-import for TARGET_ARCH=powerpc : c++ exceptions cause SEGV (9 line program)
Message-ID:  <bug-207325-8-MZVOUyG1a8@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-207325-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-207325-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207325

--- Comment #2 from Mark Millard <markmi@dsl-only.net> ---
More comparisons/contrasts:

Renaming the failing a.outs to:

exception_test.clang++380 (requires libc++/libcxxrt)
exception_test.g++49
exception_test.g++5

and using the g++ ones from a 11.0-CURRENT built via gcc 4.2.1 has them all
working fine. (clang requires libraries not present and so is not tested th=
is
way.)

On a 11.0-CURRENT built via gcc 4.2.1 producing a

exception_test.g++421

and later using it on a clang 3.8.0 based projects/clang380-import -r295601
buildworld gets the SEGV. (It works fine in its original environment.)

Using g++49 to make the following point about the working -Wl,rpath=3D? com=
piles
vs. the other failing ones --via differencing ldd output under the clang 3.=
8.0
based buildworld:

# diff exception_test.ldd_g++49_*
1c1
< exception_test.g++49:
---
> exception_test.g++49_rpath:
4,5c4,5
<       libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x419a1000)
<       libc.so.7 =3D> /lib/libc.so.7 (0x419c0000)
---
> 	libgcc_s.so.1 =3D> /usr/local/lib/gcc49/libgcc_s.so.1 (0x419a1000)
> 	libc.so.7 =3D> /lib/libc.so.7 (0x419c4000)
#=20

All the falling exception_test.* variants bind:

libgcc_s.so.1 =3D> /lib/libgcc_s.so.1

clang++ output or g++ output does not matter: No exception_test.* so bound
avoids the SEGV.

All of the

libgcc_s.so.1 =3D> /usr/local/lib/gcc*/libgcc_s.so.1

bindings work fine.



I will note that the exception_test.g++* ones produced from the clang 3.8.0
buildworld context without -Wl,-rpath=3D? use (in that same buildworld
environment):

ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
/usr/local/lib/gcc49 /usr/local/lib/gcc5 /usr/local/lib/gcc6

to bind:

libstdc++.so.6 =3D> /usr/local/lib/gcc49/libstdc++.so.6

but the exception_test.clang++380 example does not use that library yet sti=
ll
has the SEGV problem. It is libgcc_s.so.1 that makes the difference.

--=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-207325-8-MZVOUyG1a8>