Date: Sun, 2 Jan 2022 21:01:56 +0000 From: rickygee <ricky@rickysquid.org> To: Luoqi Chen <luoqi.chen@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: leak sanitizer support Message-ID: <20220102210156.GA16266@rickysquid.org> In-Reply-To: <20220102193506.GA6478@rickysquid.org> References: <20211230201614.z4bsknfgdde7ufwu@mutt-hbsd> <20220102002851.GA32472@rickysquid.org> <CAHJqQjvZnthAqvE_eJ--A0tpHrxbFgYs6qWF4iq0sd3HSvKycQ@mail.gmail.com> <20220102193506.GA6478@rickysquid.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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: //GRABBED PATCH & APPLIED & BUILT/INSTALLED libclang_rt libs https://people.freebsd.org/~luoqi/lsan/ //TWIST SYSCTL KNOBS (PIE & ASLR) # sysctl kern.elf64.aslr.pie_enable=0 # sysctl kern.elf64.aslr.enable=0 //COMPILE # clang -fsanitize=address -g -o leaky3 leaky.c /* leaky.c */ #include<stdlib.h> void *p; int main() { p = malloc(7); p = 0; return 0; } //RUN # ASAN_OPTIONS=detect_leaks=1:verbosity=3 ./leaky3 [output cut] ================================================================= ==785==ERROR: LeakSanitizer: detected memory leaks Direct leak of 7 byte(s) in 1 object(s) allocated from: #0 0x28fcdd in malloc /usr/src/contrib/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:129:3 #1 0x2be638 in main /root/mem-leaky/leaky.c:6:6 #2 0x2373df in _start /usr/src/lib/csu/amd64/crt1_c.c:73:7 #3 0x8002e4007 (<unknown module>) SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s). //END TESTING Sweet! I'm not much of a c++ person but I am stoked to read up a bit more and see how you made this work - it is super cool from what I can glean so far - learning times for me - thanks! -Eric
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220102210156.GA16266>