Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Sanitizers -- status & how to use?



At Sun, 03 Nov 2024 09:10:22 +0100 (CET), Havard Eidnes <he%NetBSD.org@localhost> 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 <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpymNgUjSdhN.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index