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
5.20 threaded regression: boolean.pm -truth option breaks string literals in closures #14454
Comments
From @xdgOn Perl 5.20.X with threads, when boolean.pm uses the '-truth' option on import -- which replaces the interpreter's internal true/false values with boolean.pm objects -- we've seen a case where a string literal in an anonymous function becomes undefined, but only if a string assignment happens in the same function. The attached program demonstrates the issue. On Perl 5.18.2-threaded and Perl 5.20.0-not-threaded the output is: On Perl 5.20.0-threaded and 5.20.1-threaded, the output is: Discovered and discussed in these Github issues: While the change in 5.21.5 to prevent unlocking read-only values (which is what boolean.pm relies on) prevents boolean.pm from doing this trick, that the problem appears unreleated to true/false values, only affects threaded 5.20.X and occurs in such a peculiar circumstance suggests that there might be a deeper bug worth investigating. My perl -V output is attached. |
From @xdg |
From @xdgSummary of my perl5 (revision 5 version 20 subversion 1) configuration: Characteristics of this binary (from libperl): |
From @haargOn Thu Jan 29 07:06:25 2015, dagolden@cpan.org wrote:
It's not related to string assignment inside the anonymous sub, it's related to the sub being a closure. This particular issue only seems to happen inside anonymous closures. |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Thu Jan 29 07:06:25 2015, dagolden@cpan.org wrote:
I tried rigging the latest bleadperl locally to allow PL_sv_yes and PL_sv_no to be modified, and your example script worked. Is it worth pursuing this to see when the problem emerged and when it disappeared? -- Father Chrysostomos |
From @jkeenanOn Sat Jan 31 14:12:22 2015, sprout wrote:
Ingy has released boolean-0.44: https://metacpan.org/release/INGY/boolean-0.44 I built perl blead (commit 1886429) unthreaded and ran 'boolean-broken-pl'. It now outputs: ##### -- |
From @xdgOn Sat, Jan 31, 2015 at 5:12 PM, Father Chrysostomos via RT <
That's good to hear. I'm just a hedge-wizard, so I defer to the archmages as to whether this is To Jim's point about boolean 0.44, that version includes my recent patches So replicating this for further investigation requires an older perl or David -- |
From zefram@fysh.orgboolean.pm is not a core module. Its "-truth" option does something -zefram |
@iabyn - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#123698 (status was 'rejected')
Searchable as RT123698$
The text was updated successfully, but these errors were encountered: