Date: Thu, 22 Feb 2024 08:47:29 +0000 From: David Chisnall <theraven@freebsd.org> To: Brooks Davis <brooks@freebsd.org> Cc: Hartmut.Brandt@dlr.de, current@freebsd.org Subject: Re: sanitizers broken (was RE: libc/libsys split coming soon) Message-ID: <D44BFE8D-5E84-4F86-A298-325B738B3821@freebsd.org> In-Reply-To: <ZdZWReCk2N_urcAr@spindle.one-eyed-alien.net> References: <ZdZWReCk2N_urcAr@spindle.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21 Feb 2024, at 20:00, Brooks Davis <brooks@freebsd.org> wrote: >=20 > 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 syscalls was more important than avoiding changes > to the sanitizer interface. On Darwin, Apple added a special __interpose section that contains pairs of f= unctions to be replaced and replacements. Within the library supplying the i= nterposer, the symbol is resolved to the next version along, but everything t= hat links to the interposing library sees the wrapped version. I wonder if it=E2=80=99s worth teaching rtld to do something equivalent. It=E2= =80=99s a fairly lightweight generic mechanism that avoids a lot of the hack= s that the sanitisers (and other things, such as instrumented malloc wrapper= s) do. David=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D44BFE8D-5E84-4F86-A298-325B738B3821>