Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2024 09:02:36 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        hartmut.brandt@dlr.de, Mark Johnston <markj@FreeBSD.org>, FreeBSD Current <freebsd-current@freebsd.org>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>
Subject:   Re: sanitizers broken (was RE: libc/libsys split coming soon)
Message-ID:  <41665018-A638-43BB-85D2-EAB1878028FA@yahoo.com>
In-Reply-To: <F68DB36B-51A9-4433-9008-7FB44D77D06C@yahoo.com>
References:  <F68DB36B-51A9-4433-9008-7FB44D77D06C@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 21, 2024, at 08:38, Mark Millard <marklmi@yahoo.com> wrote:

> Mark Johnston <markj_at_freebsd.org> wrote on
> Date: Wed, 21 Feb 2024 13:33:43 UTC :
>=20
>> On Wed, Feb 21, 2024 at 09:52:23AM +0000, Hartmut.Brandt@dlr.de =
wrote:
>>> Hi,
>>>=20
>>> I updated yesterday and now event a minimal program with
>>>=20
>>> cc -fsanitize=3Daddress
>>>=20
>>> produces
>>>=20
>>> ld: error: undefined symbol: __elf_aux_vector
>>>>>> referenced by sanitizer_linux_libcdep.cpp:950 =
(/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_=
linux_libcdep.cpp:950)
>>>>>> sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in archive =
/usr/lib/clang/17/lib/freebsd/libclang_rt.asan-x86_64.a
>>> cc: error: linker command failed with exit code 1 (use -v to see =
invocation)
>>>=20
>>> I think this is caused by the libsys split.
>>=20
>> I don't see any such problem on a system running 5f7ac491eef4, which
>> includes the libsys split. Which compiler are you using, and which
>> revision are you running?
>=20
> Trivial to reproduce via pkgbase install/upgrade:
>=20
> # uname -apKU
> FreeBSD aarch64-main-pkgs 15.0-CURRENT FreeBSD 15.0-CURRENT =
main-n268410-445d3d227e68 GENERIC-NODEBUG arm64 aarch64 1500014 1500014

Gack: pkgbase does not have the kernel and world at the same place
relative to git commits of source code. See my note from yesterday:

=
https://lists.freebsd.org/archives/freebsd-pkgbase/2024-February/000319.ht=
ml

Looking at /usr/src/tests/sys/kern/sigsys.c in this pkgbse context
shows the content from about 10 hours after 445d3d227e68's commit:

git: e53b83a849e3 - main - tests/sigsys: initialize parameter passed to =
sysctlbyname() Gleb Smirnoff
(CommitDate: 2024-02-20 22:37:45 +0000)

(Note: The next commit's source was not present.)


> # more main.c
> int main(void) { return 0; }
>=20
> # cc -fsanitize=3Daddress main.c
> ld: error: undefined symbol: __elf_aux_vector
>>>> referenced by sanitizer_linux_libcdep.cpp:950 =
(/home/bapt/worktrees/main/contrib/llvm-project/compiler-rt/lib/sanitizer_=
common/sanitizer_linux_libcdep.cpp:950)
>>>>              sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in =
archive /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-aarch64.a
>>>> referenced by sanitizer_linux_libcdep.cpp:950 =
(/home/bapt/worktrees/main/contrib/llvm-project/compiler-rt/lib/sanitizer_=
common/sanitizer_linux_libcdep.cpp:950)
>>>>              sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in =
archive /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-aarch64.a
> cc: error: linker command failed with exit code 1 (use -v to see =
invocation)

I do not see the issue in my (somehwat older) personal builds:

# uname -apKU
you have mail
FreeBSD CA72-16Gp-ZFS 15.0-CURRENT FreeBSD 15.0-CURRENT #134 =
main-n268363-8b67c670a49b-dirty: Sat Feb 17 16:22:31 PST 2024     =
root@CA72-16Gp-ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm6=
4.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1500014 1500014

(Here kernel and world match git hashes: 8b67c670a49b . But
my personal builds have patches and other tailoring relative
to the official git hash they are based on.)

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41665018-A638-43BB-85D2-EAB1878028FA>