Example program showing the bug on perl versions 5.26 and 5.28 on musl systems:
$x = "1_1";
$y = "1_1";
print index($x, $y);
This should print 0, on affected setups it typically prints a large negative number.
Among other things, this breaks the openssl build system:
Upstream has a series of 5 patches that seem to resolve this issue:
Unfortunately, it disables the memmem optimizations for gentoo musl users (the ldd test doesn't work). This is still superior to the current breakage.
I am aware of the issue, see . I was waiting for the perl team to come up with a fix --- thanks for bringing it to my attention.
I'd urge the perl team to add those patches since they are from upstream and they fix a serious issue with gentoo/musl.
Ref.  https://github.com/gentoo/musl/pull/205
This will be fixed in 5.28.2 (out soon and in preparation).
The bug has been referenced in the following commit(s):
Author: Andreas K. Hüttel <email@example.com>
AuthorDate: 2019-04-19 15:57:12 +0000
Commit: Andreas K. Hüttel <firstname.lastname@example.org>
CommitDate: 2019-04-19 16:52:03 +0000
package.mask: Unmask Perl 5.28.2
Signed-off-by: Andreas K. Hüttel <email@example.com>
profiles/package.mask | 7 -------
1 file changed, 7 deletions(-)
Fixed in 5.28.2