-
Notifications
You must be signed in to change notification settings - Fork 549
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
Avoid unnecessary "changing use VERSION ..." message around string eval (fixes #22121) #22175
Conversation
Once I saw the test failures in 3 files reported by CI, I built and tested your branch on both Linux and FreeBSD. Though the failures I got there were similar to what was reported by CI, there were some interesting differences in error output, most notably: Ubuntu Linux 22.04 LTS
FreeBSD-13
Note the |
The test failures I cited last night are now PASSing. |
@haarg |
e9ebc5b
to
6cede0e
Compare
Here's some commits that attempt to fix it. See PR description for a fuller detail. I vote we merge both, but if the second commit seems weird I'm happy to take just the first, and we'll document the weirdness. Somewhere. |
…al op We need to save the value of PL_prevailing_version at the time the eval op was compiled, so it can be put in place during the running code. Ideally we'd do something more robust, like change the OP_ENTERVAL op class into UNOP_AUX, so that the aux vector can store additional information like the version number and perhaps the frozen hints hash. In practice it is far too close to the 5.40 release to contemplate such a change now, so this is a less intrusive but hackier change to achieve the same aim. See also Perl#22121
…ng eval so perl code doesn't get to see it
I don't completely understand the ramifications of the code change, but it looks plausible to me and fixes the problem in my tests. So I'd say merge it. |
We need to save the value of PL_prevailing_version at the time the eval op was compiled, so it can be put in place during the running code.
Ideally we'd do something more robust, like change the OP_ENTERVAL op class into UNOP_AUX, so that the aux vector can store additional information like the version number and perhaps the frozen hints hash.
In practice it is far too close to the 5.40 release to contemplate such a change now, so this is a less intrusive but hackier change to achieve the same aim.
This is in two commits, because the first commit fixes the bug but leaves an ugly
$^H{"CORE/prevailing_version"}
in the hints hash inside a string eval. Probably not a huge disaster but it's messy. The second commit tidies that up too, but is implemented in a bit of a weird way around not triggeringPERL_MAGIC_hinthash
while deleting the key. It's not great but gets the job done.We can discuss whether we want to merge both commits, or just one the first one.