-
Notifications
You must be signed in to change notification settings - Fork 578
Assertion `!(o->op_private & ~PL_op_private_valid[type])' failed #15619
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
Comments
From @geeknikTriggered in Perl v5.25.5 (v5.25.4-110-g95c0a76). ./perl -e 'sub{map{0}0..~0' |
From @hvdsOn Tue, 20 Sep 2016 13:39:11 -0700, brian.carpenter@gmail.com wrote:
op_private is "by default, set to the number of children until the operation is privatized by a check routine". In this case we're in ck_grep() for the MAPSTART op, and op_private has been set to 2 for the number of children; however we see the range error and die (and thus try to free the ops) before that gets far enough to reset it at op.c:10304: Here are the parts of the stack trace I think are relevant: #3 0x00007ffff72e7ca2 in __GI___assert_fail ( I don't know why setting op_private to numargs doesn't cause problems like this more regularly, or how this sort of thing should be fixed. Hugo |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Tue, Dec 06, 2016 at 05:40:36AM -0800, Hugo van der Sanden via RT wrote:
I haven't looked closely at this particular issue, but that assert isn't Perl_op_free(pTHX_ OP *o) so perhaps the issue here is why PL_parser->error_count isn't true at that -- |
From @hvdsOn Tue, 06 Dec 2016 06:15:08 -0800, davem wrote:
Ah, good point, I missed that. I'll look more this evening. Hugo |
From @hvdsOn Tue, 06 Dec 2016 06:15:08 -0800, davem wrote:
It looks like error_count is only touched by Perl_qerror(), which is called in only a handful of places - and I guess it's intended only for compile errors. This particular error is a runtime error, triggered at this point by constant folding. Given that a runtime error can kill us mid-compile, we could make the op_free check require IN_PERL_RUNTIME - but my gut says that's a lot too broad, where the current check is only slightly too narrow. I think the right answer is not to let it happen in the first place. Back in 2006 (commit b7f7fd0), constant folding was (effectively) wrapped in an eval{} so we could defer till runtime if it raised an error. I'm not sure why the same wasn't applied to gen_constant_list() at the time, but it feels like it's needed here for the same reason, and it'd also handily fix this problem. The test-case (and primary justification) for that is that neither of these should die: % perl -le 'if (0) { $a = 1 / 0 } print "fold_constants ok"' Hugo |
From [email protected]Fixed by 3a0fe09. -zefram |
@iabyn - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.26.0, this and 210 other issues have been Perl 5.26.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#129320 (status was 'resolved')
Searchable as RT129320$
The text was updated successfully, but these errors were encountered: