-
Notifications
You must be signed in to change notification settings - Fork 542
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
BBC: Scalar-List-Utils-1.65 breaks Tie::RefHash::Weak #22528
Comments
Probably the same root cause:
|
... which in turn reduces to:
|
Huh. Exciting times:
Seems to be specifically related to the tailcall though, because similar invocations don't fail:
(both run OK) |
... and simplify the code a bit. Tie::RefHash used to either import `refaddr` from Scalar::Util, if available, or define its own fallback solution based on overload::StrVal, also under the name `refaddr`. This is not a documented public API, but Tie::RefHash::Weak calls it anyway. In commit 2cfa4bd, the code was changed to blindly call Scalar::Util::refaddr directly, making the whole Scalar::Util availability detection logic pointless. This commit also introduced a weird indirection: Instead of importing `refaddr` from Scalar::Util as before, or manually doing the equivalent (`*refaddr = \&Scalar::Util::refaddr;`), it defined `*refaddr = sub { goto &Scalar::Util::refaddr };`. This `goto` construct happens to tickle Perl/perl5#22528 (in combination with Scalar::Util 1.64+, which delegates to builtin::refaddr). Normally this would cause crashes whenever `refaddr` is used. However, Tie::RefHash itself is unaffected because it never calls the `refaddr` sub that it defines, leaving Tie::RefHash::Weak as the only affected module. Work around the issue by getting rid of the custom detection/fallback logic and just importing `refaddr` from Scalar::Util, (mostly) as before.
Tie-RefHash-1.41 has been released which will fix this (thanks @mauke). |
(reopened.. Scalar::Util still needs to be fixed; just the collateral damage has been fixed so far) |
Was Tie-RefHash experiencing test failures? The failures I reported in this ticket were in Tie-RefHash-Weak. |
The errors in Tie-RefHash-Weak were caused by faulty code in Tie::RefHash. |
I've sync'd Tie::RefHash into core. Hopefully the workaround there will fix the Tie::RefHash::Weak errors. Once that is confirmed, we can close this issue, I think. For the underlying root cause (crash in |
Also affected by recent List::Util: Util-Underscore-v1.4.2; see latk/p5-Util-Underscore#10 @leonerd , can you have a look there as well? |
Same root cause. https://metacpan.org/dist/Util-Underscore/source/lib/Util/Underscore/References.pm is full of |
With the recent merge of #22582, which fixed #22542, the CPAN distributions cited in this ticket are now PASSing on CPANtesters. http://fast-matrix.cpantesters.org/?dist=Tie-RefHash-Weak;perl=5.41.4;reports=1#sl=7,1 http://fast-matrix.cpantesters.org/?dist=Util-Underscore;perl=5.41.4;reports=1#sl=7,1 Labelling this ticket Closable. |
CPAN distribution Tie-RefHash-Weak has begun to experience test failures on CPANtesters. Sample failure report: http://www.cpantesters.org/cpan/report/c2837ae0-5ce3-11ef-bb02-ec823e4a88bb
Excerpt from failure output:
Bisection with the following invocation:
... points to :
That is, synching the most recent version of Scalar-List-Utils into blead triggered these failures. @leonerd, can you take a look? Thanks.
Cited upstream: https://rt.cpan.org/Ticket/Display.html?id=155006
The text was updated successfully, but these errors were encountered: