From a7a1d5e9015d8a91fdcbb00d176697ff84a3bc78 Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Sat, 16 Aug 2025 17:44:16 +0200 Subject: [PATCH] perlhacktips: fix ASan Configure settings - Change "blacklist" to "ignorelist" because that is what the current ASan documentation/wiki uses. - Move "-fsanitize-ignorelist=..." to ccflags (it is a C compiler option, not a Configure option). - Use quotes for option values with spaces, not backslashes. I think it's more readable. Fixes #23579. --- pod/perlhacktips.pod | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/pod/perlhacktips.pod b/pod/perlhacktips.pod index 69ca29c4ea..45ea2b635b 100644 --- a/pod/perlhacktips.pod +++ b/pod/perlhacktips.pod @@ -1585,10 +1585,9 @@ C. To build perl with AddressSanitizer, your Configure invocation should look like: - sh Configure -des -Dcc=clang \ - -Accflags=-fsanitize=address -Aldflags=-fsanitize=address \ - -Alddlflags=-shared\ -fsanitize=address \ - -fsanitize-blacklist=`pwd`/asan_ignore + sh Configure -des -Dcc=clang \ + -Accflags="-fsanitize=address -fsanitize-ignorelist=$PWD/asan_ignore" \ + -Aldflags="-fsanitize=address" -Alddlflags="-shared -fsanitize=address" where these arguments mean: @@ -1599,27 +1598,25 @@ where these arguments mean: This should be replaced by the full path to your clang executable if it is not in your path. -=item * -Accflags=-fsanitize=address +=item * -Accflags="-fsanitize=address -fsanitize-ignorelist=$PWD/asan_ignore" Compile perl and extensions sources with AddressSanitizer. -=item * -Aldflags=-fsanitize=address +AddressSanitizer will ignore functions listed in the F +file. (This file should contain a short explanation of why each of the +functions is listed.) + +=item * -Aldflags="-fsanitize=address" Link the perl executable with AddressSanitizer. -=item * -Alddlflags=-shared\ -fsanitize=address +=item * -Alddlflags="-shared -fsanitize=address" Link dynamic extensions with AddressSanitizer. You must manually specify C<-shared> because using C<-Alddlflags=-shared> will prevent Configure from setting a default value for C, which usually contains C<-shared> (at least on Linux). -=item * -fsanitize-blacklist=`pwd`/asan_ignore - -AddressSanitizer will ignore functions listed in the C -file. (This file should contain a short explanation of why each of the -functions is listed.) - =back See also L.