Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.96k stars 555 forks source link

BBC: perl 5.41.x breaks BINARY/Test-NoLeaks-0.06.tar.gz #22704

Open eserte opened 1 week ago

eserte commented 1 week ago

There are no pass reports anymore for Test-NoLeaks-0.06: http://fast2-matrix.cpantesters.org/?dist=Test-NoLeaks+0.06 Last pass report was with perl 5.40.0 (note that non-Linux systems never had pass reports).

On my system it fails like this:

#   Failed test 'non-tolerate way might trigger memory false memory leaks report'
#   at t/03-non-tolerate.t line 11.
# Looks like you failed 1 test of 2.
t/03-non-tolerate.t ....
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests

#   Failed test 'there are leaks, because cache hasn't been warmed up'
#   at t/04-no-warm-up.t line 11.
# Looks like you failed 1 test of 2.
t/04-no-warm-up.t ......
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
jkeenan commented 1 week ago

Bisecting on unthreaded builds on Linux with the following invocation:

perl Porting/bisect.pl \
--module=Test::NoLeaks \
--start=f22a16ecf4821b7e93d2569f630817a2631fddd9 \
--end=e9f8aee2bc0fcdce0a13746848aad38c23073ef7

... points to 06e421c559 as the breaking commit:

commit 06e421c559c63975f29c35ba3588a0e6b0c75eca
Author:     Richard Leach <rich+perl@hyphen-dash-hyphen.info>
AuthorDate: Fri Dec 9 23:42:32 2022 +0000
Commit:     Richard Leach <rich+perl@hyphen-dash-hyphen.info>
CommitDate: Tue Jun 11 21:20:02 2024 +0100

    S_fold_constants: remove early SvREADONLY(sv) to allow SvIsCOW(sv)

    Standard CONST PVs have the IsCOW flag set, meaning that COW can
    be used when assigning the CONST to a variable, rather than making
    a copy of the buffer. CONST PVs arising from constant folding have
    been lacking this flag, leading to unnecessary copying of PV buffers.
...    

@richardleach can you take a look? Thanks.

richardleach commented 1 week ago

Thanks, I've self-assigned. First guess is that it might be a bit like Dash::Leak was: the test code doesn't leak as badly as it expects it to do any more.

richardleach commented 6 days ago

Thanks, I've self-assigned. First guess is that it might be a bit like Dash::Leak was: the test code doesn't leak as badly as it expects it to do any more.

Yes, it looks like that and a similar PR seems to fix the failures.

richardleach commented 1 day ago

Created a PR at https://github.com/deriv-com/perl-Test-NoLeaks/pull/16