handle an ASAN specific section name parsing nm output on darwin tonyc/libperl-asan
authorTony Cook <tony@develop-help.com>
Tue, 16 Apr 2019 05:24:00 +0000 (15:24 +1000)
committerTony Cook <tony@develop-help.com>
Tue, 16 Apr 2019 05:24:00 +0000 (15:24 +1000)
ASAN builds can generate a section name of __asan_cstring on darwin,
which could make libperl.t fail.

t/porting/libperl.t

index 1536fda..3c8c433 100644 (file)
@@ -250,7 +250,7 @@ sub nm_parse_darwin {
             # String literals can live in different sections
             # depending on the compiler and os release, assumedly
             # also linker flags.
-            if (/^\(__TEXT,__(?:const|cstring|literal\d+)\) (?:non-)?external _?(\w+)(\.\w+)?$/) {
+            if (/^\(__TEXT,__(?:const|(?:asan_)?cstring|literal\d+)\) (?:non-)?external _?(\w+)(\.\w+)?$/) {
                 my ($symbol, $suffix) = ($1, $2);
                 # Ignore function-local constants like
                 # _Perl_av_extend_guts.oom_array_extend