At Sun, 03 Nov 2024 09:10:22 +0100 (CET), Havard Eidnes <[email protected]> wrote: Subject: Re: Sanitizers -- status & how to use? > > Hence > my earlier question whether we have more up-to-date information > about the implementation status for the various sanitizers for our > different C compilers.
I've used -fsanitize=undefined on macos with Clang, for years now.
I've also more recently used it with GCC, along with GCC's "undefined"
sub-options; and I've also tried -fsanitize=address and -fsanitize=leak,
all on NetBSD (with GCC-9.3 and newer), and Linux.
In fact I have a workflow on Github that uses all three (independently
in separate runs as you cannot combine them) on macos with clang and
linux with GCC as well. Unfortunately I still don't have NetBSD VM
runners set up on Github though.
On most systems the address sanitizer needs PaX ASLR disabled for the
program, (paxctl +a prog) and on NetBSD also needs "ulimit -v unlimited".
On NetBSD I think the GCC leak sanitizer always fails a check early in
startup, but I haven't tried looking into it deeper yet.
I haven't tripped the GCC undefined sanitizer on NetBSD recently -- but
I think it works OK.
Unfortunately none of the sanitizers work on NetBSD with static-linked
code (nor anywhere, I guess).
--
Greg A. Woods <[email protected]>
Kelowna, BC +1 250 762-7675 RoboHack <[email protected]>
Planix, Inc. <[email protected]> Avoncote Farms <[email protected]>
pgpwh1oukkPve.pgp
Description: OpenPGP Digital Signature
