Re: sanitizers broken (was RE: libc/libsys split coming soon) [errno in libsys: any analogy to __elf_aux_vector ?]

2024-02-22 Thread Brooks Davis
On Thu, Feb 22, 2024 at 10:16:30AM -0800, Mark Millard wrote: > Brooks Davis wrote on > Date: Thu, 22 Feb 2024 02:03:09 UTC : > > > On Thu, Feb 22, 2024 at 02:57:13AM +0200, Konstantin Belousov wrote: > > > On Wed, Feb 21, 2024 at 08:20:25PM +, Brooks Davis wrote: > > > > That's probably

Re: sanitizers broken (was RE: libc/libsys split coming soon) [errno in libsys: any analogy to __elf_aux_vector ?]

2024-02-22 Thread Mark Millard
Brooks Davis wrote on Date: Thu, 22 Feb 2024 02:03:09 UTC : > On Thu, Feb 22, 2024 at 02:57:13AM +0200, Konstantin Belousov wrote: > > On Wed, Feb 21, 2024 at 08:20:25PM +, Brooks Davis wrote: > > > That's probably worth a shot. Static linking will work anyway because > > > libc.a in effect

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-22 Thread Alexander Leidinger
Am 2024-02-21 10:52, schrieb hartmut.bra...@dlr.de: Hi, I updated yesterday and now event a minimal program with cc -fsanitize=address produces ld: error: undefined symbol: __elf_aux_vector referenced by sanitizer_linux_libcdep.cpp:950

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-22 Thread David Chisnall
On 21 Feb 2024, at 20:00, Brooks Davis wrote: > > The sanitizers reach somewhat questionably into libc internals that are > exported to allow rtld to update them. I was unable to find an solution > that didn't break this and I felt that fixing things like closefrom() > using non-deprecated

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Brooks Davis
On Thu, Feb 22, 2024 at 02:57:13AM +0200, Konstantin Belousov wrote: > On Wed, Feb 21, 2024 at 08:20:25PM +, Brooks Davis wrote: > > That's probably worth a shot. Static linking will work anyway because > > libc.a in effect embeds libsys to retain compatability. > Please do not add libsys.so

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Konstantin Belousov
On Wed, Feb 21, 2024 at 08:20:25PM +, Brooks Davis wrote: > That's probably worth a shot. Static linking will work anyway because > libc.a in effect embeds libsys to retain compatability. Please do not add libsys.so to the ABI. Right now it is an implementation detail of libthr and libc, and

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Brooks Davis
That's probably worth a shot. Static linking will work anyway because libc.a in effect embeds libsys to retain compatability. -- Brooks On Wed, Feb 21, 2024 at 09:12:41PM +0100, Dimitry Andric wrote: > Can't we just add libsys.so to the /usr/lib/libc.so linker script? That would > work for

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Dimitry Andric
Can't we just add libsys.so to the /usr/lib/libc.so linker script? That would work for everything except static linking? -Dimitry > On 21 Feb 2024, at 21:00, Brooks Davis wrote: > > TL;DR: you can work around this by adding -lsys to the link line and I > aim to improve the situation soon. >

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Brooks Davis
TL;DR: you can work around this by adding -lsys to the link line and I aim to improve the situation soon. The sanitizers reach somewhat questionably into libc internals that are exported to allow rtld to update them. I was unable to find an solution that didn't break this and I felt that fixing

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Mark Millard
[Brooks' activity related to commit 99ea67573164637d633e8051eb0a5d52f1f9488e looks likely for what changed the status: "lib{c,sys}: move auxargs more firmly into libsys".] On Feb 21, 2024, at 09:02, Mark Millard wrote: > On Feb 21, 2024, at 08:38, Mark Millard wrote: > >> Mark Johnston wrote

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Mark Millard
On Feb 21, 2024, at 08:38, Mark Millard wrote: > Mark Johnston wrote on > Date: Wed, 21 Feb 2024 13:33:43 UTC : > >> On Wed, Feb 21, 2024 at 09:52:23AM +, hartmut.bra...@dlr.de wrote: >>> Hi, >>> >>> I updated yesterday and now event a minimal program with >>> >>> cc -fsanitize=address

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Mark Millard
Mark Johnston wrote on Date: Wed, 21 Feb 2024 13:33:43 UTC : > On Wed, Feb 21, 2024 at 09:52:23AM +, hartmut.bra...@dlr.de wrote: > > Hi, > > > > I updated yesterday and now event a minimal program with > > > > cc -fsanitize=address > > > > produces > > > > ld: error: undefined symbol:

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Hartmut Brandt
On Wed, 21 Feb 2024, Mark Johnston wrote: MJ>On Wed, Feb 21, 2024 at 09:52:23AM +, hartmut.bra...@dlr.de wrote: MJ>> Hi, MJ>> MJ>> I updated yesterday and now event a minimal program with MJ>> MJ>> cc -fsanitize=address MJ>> MJ>> produces MJ>> MJ>> ld: error: undefined symbol:

Re: sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Mark Johnston
On Wed, Feb 21, 2024 at 09:52:23AM +, hartmut.bra...@dlr.de wrote: > Hi, > > I updated yesterday and now event a minimal program with > > cc -fsanitize=address > > produces > > ld: error: undefined symbol: __elf_aux_vector > >>> referenced by sanitizer_linux_libcdep.cpp:950 > >>>

sanitizers broken (was RE: libc/libsys split coming soon)

2024-02-21 Thread Hartmut.Brandt
Hi, I updated yesterday and now event a minimal program with cc -fsanitize=address produces 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) >>>