Date: Wed, 5 Jan 2022 05:18:59 +0000 From: Eric Gullufsen <ricky@rickysquid.org> To: Luoqi Chen <luoqi.chen@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: leak sanitizer support Message-ID: <20220105051859.GA28486@rickysquid.org> In-Reply-To: <20220102210156.GA16266@rickysquid.org> References: <20211230201614.z4bsknfgdde7ufwu@mutt-hbsd> <20220102002851.GA32472@rickysquid.org> <CAHJqQjvZnthAqvE_eJ--A0tpHrxbFgYs6qWF4iq0sd3HSvKycQ@mail.gmail.com> <20220102193506.GA6478@rickysquid.org> <20220102210156.GA16266@rickysquid.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 02, 2022 at 09:01:56PM +0000, rickygee wrote:
> On Sun, Jan 02, 2022 at 07:35:06PM +0000, Eric Gullufsen wrote:
> > Awesome sounds great - will test with your new diff & module files posted &
> > report back here in a few - thanks!
> >
> > On Sun, Jan 02, 2022 at 09:53:06AM -0800, Luoqi Chen wrote:
> > > locking issue and also to cleanup some unused code, would you mind trying
> > > out the new version? I've updated the diff files.
> > >
> > > -luoqi
> >
>
> Hey Luoqi,
>
> Dang you rock - I applied your updated patch against -current (commit
> 642f77be1d), and everything went swimmingly in initial testing:
>
> -Eric
Hey Luoqi,
Shoot so sorry for my confusion, but it looks like the updated diff/.cpp do not
actually run quite right on -current. I think this is due to the signature of
SuspendedThreadsList::GetRegistersAndSP changing in June 2021
A commit in June 2021 (e8d8bef9) changed this signature on you in
sanitizer_stoptheworld.h
Here is `git show` for that commit/file, where you can see the sig change:
[e@bsd /usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common]$ git show
e8d8bef96 -- sanitizer_stoptheworld.h
[cut]
- virtual PtraceRegistersStatus GetRegistersAndSP(uptr index, uptr *buffer,
- uptr *sp) const {
++ virtual PtraceRegistersStatus GetRegistersAndSP(
++ uptr index, InternalMmapVector<uptr> *buffer, uptr *sp) const {
+ UNIMPLEMENTED();
+ }
+
[cut]
I think this explains my run-time errors when using lsan on -current (see
output)
[begin error output]
AddressSanitizer: CHECK failed: sanitizer_stoptheworld.h:37 "((0 &&
"unimplemented")) != (0)" (0x0, 0x0)
(tid=169384)
AddressSanitizer:DEADLYSIGNAL
[end error output]
Anyway - just a heads up - you probably would have been right on it when you
moved up to the new header, instead of squinting at lldb like me for *awhile*.
Oh here is a patch it might be easier to see it that way:
https://raw.githubusercontent.com/emgullufsen/freebsd/lsan/lsan-params.diff
Thanks and sorry for my confusion earlier!
-Eric
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220105051859.GA28486>
