Skip to content

Commit a7a1d5e

Browse files
committed
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.
1 parent b70be8d commit a7a1d5e

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

pod/perlhacktips.pod

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,10 +1585,9 @@ C<ASAN_OPTIONS=detect_leaks=1>.
15851585
To build perl with AddressSanitizer, your Configure invocation should
15861586
look like:
15871587

1588-
sh Configure -des -Dcc=clang \
1589-
-Accflags=-fsanitize=address -Aldflags=-fsanitize=address \
1590-
-Alddlflags=-shared\ -fsanitize=address \
1591-
-fsanitize-blacklist=`pwd`/asan_ignore
1588+
sh Configure -des -Dcc=clang \
1589+
-Accflags="-fsanitize=address -fsanitize-ignorelist=$PWD/asan_ignore" \
1590+
-Aldflags="-fsanitize=address" -Alddlflags="-shared -fsanitize=address"
15921591

15931592
where these arguments mean:
15941593

@@ -1599,27 +1598,25 @@ where these arguments mean:
15991598
This should be replaced by the full path to your clang executable if it
16001599
is not in your path.
16011600

1602-
=item * -Accflags=-fsanitize=address
1601+
=item * -Accflags="-fsanitize=address -fsanitize-ignorelist=$PWD/asan_ignore"
16031602

16041603
Compile perl and extensions sources with AddressSanitizer.
16051604

1606-
=item * -Aldflags=-fsanitize=address
1605+
AddressSanitizer will ignore functions listed in the F<asan_ignore>
1606+
file. (This file should contain a short explanation of why each of the
1607+
functions is listed.)
1608+
1609+
=item * -Aldflags="-fsanitize=address"
16071610

16081611
Link the perl executable with AddressSanitizer.
16091612

1610-
=item * -Alddlflags=-shared\ -fsanitize=address
1613+
=item * -Alddlflags="-shared -fsanitize=address"
16111614

16121615
Link dynamic extensions with AddressSanitizer. You must manually
16131616
specify C<-shared> because using C<-Alddlflags=-shared> will prevent
16141617
Configure from setting a default value for C<lddlflags>, which usually
16151618
contains C<-shared> (at least on Linux).
16161619

1617-
=item * -fsanitize-blacklist=`pwd`/asan_ignore
1618-
1619-
AddressSanitizer will ignore functions listed in the C<asan_ignore>
1620-
file. (This file should contain a short explanation of why each of the
1621-
functions is listed.)
1622-
16231620
=back
16241621

16251622
See also L<https://github.com/google/sanitizers/wiki/AddressSanitizer>.

0 commit comments

Comments
 (0)