pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lang/gcc10 is missing libasan because patches not ported forward



On Sat 17 Dec 2022 at 19:03:58 +0100, Rhialto wrote:
> Anyway, this still doesn't produce a working sanitizer in the end.
> Although libasan and libusan are now built, they still miss something.
> A small test with a known-working case from gcc8 now has a link error:
> 
> /usr/bin/ld: /usr/pkg/gcc10/lib/gcc/x86_64--netbsd/10.4.0/../../../libasan.so: undefined reference to `__sanitizer::StopTheWorld(void (*)(__sanitizer::SuspendedThreadsList const&, void*), void*)'
> collect2: error: ld returned 1 exit status

Fixing that with adding another missing netbsd file in the same
Makefile.{am,in} that was patched before adds this.

Next two hurdles:

This sanitizer is not compatible with enabled ASLR

==19445==ASan runtime does not come first in initial library list; you
should either link runtime to your application or manually preload it
with LD_PRELOAD.

The first seems a new limitation?  In any case this makes the sanitizer
a lot less useful.

The second one, I've seen it before and I never managed to solve it
myself; sometimes it seems to go away or come back, not depending on
what I do. Somehow I get this again when I recompile my test with gcc8.
Setting LD_PRELOAD=/usr/pkg/gcc10//lib/./libasan.so. causes a SEGV.

This makes the sanitizer useless.

-Olaf.
-- 
___ "Buying carbon credits is a bit like a serial killer paying someone else to
\X/  have kids to make his activity cost neutral." -The BOFH    falu.nl@rhialto

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index