-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert eval in DB fix, changing back to 5.38 CV outside referencing behaviour #22635
base: blead
Are you sure you want to change the base?
Conversation
Fixes #22547 |
This reverts commit 386907f. Reinstates the behaviour of CV outside references from 5.38, fixing Perl#22547 Breaks Perl#19370
and a version with eval EXPR which will remain broken
c513c2f
to
891dd58
Compare
@@ -1975,7 +1976,8 @@ S_cv_clone_pad(pTHX_ CV *proto, CV *cv, CV *outside, HV *cloned, | |||
PL_compcv = cv; | |||
if (newcv) SAVEFREESV(cv); /* in case of fatal warnings */ | |||
|
|||
CvOUTSIDE(cv) = CvREFCNT_inc_simple(outside); | |||
if (CvHASEVAL(cv)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this doesn't backport cleanly into v5.40.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like CvREFCNT_inc_simple isn't a thing in v5.40.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like CvREFCNT_inc_simple isn't a thing in v5.40.0
I added it quite recently. For a backport you can just use regular SvREFCNT_inc
and cast its return value
CvOUTSIDE(cv) = (CV *)SvREFCNT_inc(outside);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep it's what I'm doing in my patch. It would be really good to see this backport and there to be a 5.40.1 given we're reverting a behavior that only breaks in 5.40 right now.
Reverts 386907f changing CV outside linking to match 5.38.
This is generally suitable for backporting to 5.40, more complex changes (like making outside a weakref) probably aren't.
I might add the perldelta later.
This is draft, I plan to add some other TODO tests for the other issues that came up in discussion.