-
Notifications
You must be signed in to change notification settings - Fork 567
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
readline assert on SvOK_off(glob) #14493
Comments
From @hvdsAFL (<http://lcamtuf.coredump.cx/afl)>) finds this: % ./miniperl -e '*x=<y>' Conversely, '*x=<>' avoids the problem going through the path a few lines further down after the have_fp label, generating a reasonable "Can't coerce GLOB to string" at the point of: I don't know near enough about this area to hazard a guess at a fix. Oddly, bisect points at this: commit 288b8c0 Make struct regexp the body of SVt_REGEXP SVs, REGEXPs become SVs, .. which doesn't seem a hugely likely culprit. Hugo |
From @cpansproutOn Tue Feb 10 18:55:00 2015, hv wrote:
I probably won’t be able to fix this tonight, so here are my incoherent notes to myself, copied and pasted: perl-5.8.0-1046-gba92458 is related. It fixed #21628. The buggy code goes back to a0d0e21 (perl 5.000). Instead of trying to inline the part of sv_setsv that we need, we should probably just do sv_setsv(TARG,NULL), since it knows how to handle special things like typeglobs (otherwise we would have to repeat the warning code, too). -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Tue Feb 10 18:55:00 2015, hv wrote:
That’s not correct, either. If I assign a string to *x, it should do a typeglob aliasing. This problem is actually quite pervasive. There are many cases that have been broken since 5.20, which I plan to fix soon. The rest of them, which go back to 5.6 or so, I will probably leave for now. Here is one example: $ perl5.20.2 -e 'for my $x (*_) { $x = $y x $z }' -- Father Chrysostomos |
From @cpansproutOn Wed Mar 25 09:20:17 2015, sprout wrote:
These are the regressions from 5.20: Can't coerce: ./miniperl -e 'for my $x (*_) { $x = $y x $z }' Assertion failure: ./miniperl -e 'for my $x (*_) { -- Father Chrysostomos |
From @cpansproutOn Wed Mar 25 09:27:52 2015, sprout wrote:
It also turns out that any bugs relating to lexical scalar assignment that result from this optimisation also started to occur with assignment to state variable declarations, because of a1b22ab. (See also #124160.) So I have disabled that for now in ada289e. I have also disabled the targlex optimisation for those ops that did not have it in 5.20 (commit 21639bf), so, while things are still buggy, they are no buggier than 5.20. As for fixing the bugs, I don’t yet know how I would do that. This how the optimisations work: Many ops have a target, which is a scalar that the op writes to and uses to return a value. If the op can be made to write directly to a named scalar, treating that as its target, then a subsequent assignment can be skipped. So: $a = $b + $c; can have the + operator write directly to $a. Without the optimisation, + writes to its target, and then = copies the value to $a. None of these ops know how to handle a real typeglob on the lhs, and it is not known at compile time whether we will have a typeglob (due to foreach aliasing). So the solution seems to be to arrange for the optimisation to be foregone if the target turns out to be a typeglob. Modifying all the relevant pp_ functions individually to handle typeglobs would work, but I am hoping we can come up with a more robust approach, even if it just means making those pp_ functions use a different set of macros. In any case, this ticket no longer needs to block 5.22. -- Father Chrysostomos |
From @cpansproutI forgot to mention that I fixed the crash in the original report in commit aab1202. -- Father Chrysostomos |
Migrated from rt.perl.org#123790 (status was 'open')
Searchable as RT123790$
The text was updated successfully, but these errors were encountered: