Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: c4c1a848247540ca763494c09400f983bd17205a
https://github.com/Perl/perl5/commit/c4c1a848247540ca763494c09400f983bd17205a
Author: David Mitchell <[email protected]>
Date: 2024-09-12 (Thu, 12 Sep 2024)
Changed paths:
M t/porting/libperl.t
Log Message:
-----------
t/porting/libperl.t: fix issue with common symbols
Test 5 was failing on newer Linux builds with clang and ASAN.
This was indirectly because although since around 2020 both gcc and
clang have -fno-common by default, clang+ASAN was putting some private
symbols in the common section of the libperl object file while under
-fno-cpmmon, namely this output from nm:
0000000000000008 C ___asan_globals_registered
It so happens that libperl.t handled -fno-common by aliasing a hash,
$symbols{data}{common}{}, to another hash, $symbols{data}{bss}{} if
{common} was *empty*. It then looked up a particular symbol under
{common} and found it even if it was actually under {bss}. This scheme
failed as soon as {common} was non-empty even under -fno-common.
This commit removes the common-to-bss aliasing trick and instead looks
for the symbol under both common and bss. The test passes if *either*
is found.
This commit also changes the test diagnostic output accordingly. It
also now recognises (but ignores) 'w' and 'W' weak symbol types in nm
output, such as
w __stop_asan_globals
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications