Skip to content

Conversation

@richardleach
Copy link
Contributor

When copying source SV flags to the new destination SV, this function
failed to account for SVprv_WEAKREF and SVf_IVisUV flags having the
same numerical value - 0x80000000. The SVprv_WEAKREF flag was
consequently erroneously propagated when copying weakened references.

This didn't trip existing tests because SVt_IVs (the predominant SV type
for RVs) are copied using different code paths.

This commit:

  • Always drops the SVprv_WEAKREF flag in the affected code path
  • Adds additional tests for copying weakened SVs

  • This set of changes does not require a perldelta entry.

This was linked to issues Aug 29, 2025
@richardleach richardleach force-pushed the newSVsv_flags_NN_weakref branch from 3a309fa to 27e9a47 Compare August 29, 2025 01:15
mauke and others added 2 commits August 29, 2025 05:34
When copying source SV flags to the new destination SV, this function
failed to account for SVprv_WEAKREF and SVf_IVisUV flags having the
same numerical value - 0x80000000. The SVprv_WEAKREF flag was
consequently erroneously propagated when copying weakened references.

This didn't trip existing tests because SVt_IVs (the predominant SV type
for RVs) are copied using different code paths.

This commit:
  * Always drops the SVprv_WEAKREF flag in the affected code path
  * Adds additional tests for copying weakened SVs
@mauke mauke force-pushed the newSVsv_flags_NN_weakref branch from 27e9a47 to 46b447d Compare August 29, 2025 03:35
@jkeenan
Copy link
Contributor

jkeenan commented Sep 1, 2025

I build a perl locally from the branch in this pull request, then attempted to install some of the modules named in other issues:

$ ./bin/cpanm Test::Deep DBI Sub::Quote Array::Compare Moose Dist::Zilla 

Result:

$ ./bin/perl -MTest::Deep  -MDBI  -MSub::Quote  -MArray::Compare -MMoose -MDist::Zilla -E 'say qq|hello world|;'
Prototype mismatch: sub main::blessed: none vs ($) at /home/jkeenan/testing/gh-23657-richardleach-newSVsv_flags_NN_weakref-20250901/lib/perl5/site_perl/5.43.3/Sub/Exporter.pm line 897.
hello world

I'll investigate that warning, but I don't think it's an impediment to merging this p.r. into blead. Doing so now.

@jkeenan jkeenan merged commit 91dde38 into Perl:blead Sep 1, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BBC: Blead Breaks Test-Deep BBC: Blead Breaks Moose

4 participants