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
local *_; goto ⊂ segfaults on 5.18 #13302
Comments
From @HugmeirCreated by fraserb@gmail.comsub foo { say "in foo: <@_>" } This incorrectly prints "in foo: <hello bar>" in 5.16, and segfaults in Perl Info
|
From @nwc10On Sun, Sep 22, 2013 at 08:50:10PM -0700, Brian Fraser wrote:
Indeed, $ bisect.pl --target miniperl --start v5.16.0 -le 'sub foo { print "in foo: <@_>" } sub bar { local *_ = "hello foo"; goto &foo } bar("hello bar")' says 049bd5f is the first bad commit [perl #43077] Make goto &sub leave @_ alone It is a little tricky, as we have to hang on to @_ while unwinding the and at that revision behaviour changes from "in foo: <hello bar>\n" to SEGV. Program received signal SIGSEGV, Segmentation fault. valgrind said ==23520== Address 0xc is not stack'd, malloc'd or (recently) free'd So it's a structure offset of 12 from a NULL pointer. (gdb) p cx->cx_u.cx_blk.blk_u.blku_sub argarray is NULL. I don't understand enough of this to fix it without working it out from Nicholas Clark |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Mon Sep 23 01:40:58 2013, nicholas wrote:
It looks as though we need to changes things here, in pp_goto: if (CxHASARGS(cx)) /* cx->blk_sub.argarray has no reference count, so we /* GvAV(PL_defgv) might have been modified on scope If ‘arg’ is null here, we probably ought to turn off CxHASARGS and Sorry, I can’t do this right now. -- Father Chrysostomos |
From @cpansproutThis is now fixed in bfa371b. Can we backport this to 5.18? -- Father Chrysostomos |
From @tonycozOn Mon Jan 20 05:02:17 2014, perl.p5p@rjbs.manxome.org wrote:
+1 from me, which is a third vote, so cherry-picked with some noise as 2c60386. perldelta update in b380e58. Tony |
@tonycoz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#119949 (status was 'resolved')
Searchable as RT119949$
The text was updated successfully, but these errors were encountered: