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
SV *Perl_cv_const_sv_or_av(const CV *const): Assertion `((svtype)((cv)->sv_flags & 0xff)) == SVt_PVCV || ((svtype)((cv)->sv_flags & 0xff)) == SVt_PVFM' failed (op.c:7926) #15548
Comments
From @geeknikv5.25.4-5-g92d73bf ./perl -e 'my __PACKAGE__(&p0000;0;p0000' perl: op.c:7926: Perl_cv_const_sv_or_av: Assertion `((svtype)((cv)->sv_flags & 0xff)) == SVt_PVCV || ((svtype)((cv)->sv_flags & 0xff)) == SVt_PVFM' failed. Program received signal SIGABRT, Aborted. |
From zefram@fysh.orgBrian Carpenter wrote:
Reduces to 'my main(&z;0;z'. This failure mode raises wider issues that Where a single item is being lexicalised, as in "my $x", the item is $ ./perl -le 'my &z' Actually it's a little more complicated because things like "my $$p" If the list is well behaved, the difference in the mode of checking In the case with which this ticket is concerned (and using my minimised A more enlightening way to skip the semantic check is to use a sub foo { If the lexical declaration were merely "my ($x)" then all instances of The deparser doesn't handle this situation. It goes by the optree, and Getting back to "&z", we can use the conditional to evoke the same $ perl -le 'my main (1 ? $x : &z); z' We can also get a related failure by omitting the type restriction: $ perl -le 'my (1 ? $x : &z); z' There are even failures without any subsequent reference to the broken $ perl -le 'my (1 ? $x : &z);' Note that the latter SEGVs even in a debugging build, rather than We need to decide how to treat these conditionals in "my" lists. -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Sun, Jan 29, 2017 at 02:27:31AM +0000, Zefram wrote:
Is there any reason why a my() list can't be enforced (in a strict manner) -- |
From zefram@fysh.orgDave Mitchell wrote:
If we were building this from scratch then grammatical enforcement A deprecation to narrow a grammatical production like this is a tricky A grammatical restriction on the list content would sort out these issues -zefram |
From @cpansproutOn Tue, 28 Mar 2017 16:17:43 -0700, zefram@fysh.org wrote:
One that I can think of is unary plus. It’s not likely to occur often, but it is often used for disambiguation and could conceivably end up in a my() list after refactoring (and somebody forgot to remove the +, but the code worked anyway). Yes, this is only theoretical. I don‘t know whether it is worth preserving that. my +$x is an error. -- Father Chrysostomos |
From zefram@fysh.orgFather Chrysostomos via RT wrote:
Ah, indeed, that could appear in a legitimate program. It's not a usage A related usage is nested parens. These are legal, don't break anything, -zefram |
From @iabynOn Wed, Mar 29, 2017 at 03:27:41AM +0100, Zefram wrote:
Is there any reason we couldn't just add a check to Perl_localize, -- |
From zefram@fysh.orgDave Mitchell wrote:
That's effectively what we've already got. It's an error rather -zefram |
The examples zefram provided still segfault or assert in 5.37.4 and 5.34.1. |
Migrated from rt.perl.org#129068 (status was 'open')
Searchable as RT129068$
The text was updated successfully, but these errors were encountered: