Skip to content
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

pp_hot.c:1167: void S_aassign_copy_common(SV **, SV **, SV **, SV **, _Bool): Assertion `!(((svl)->sv_flags & (0x08000000|0x00010000)) && ((svl)==&PL_sv_undef || (svl)==&PL_sv_yes || (svl)==&PL_sv_no #15690

Closed
p5pRT opened this issue Nov 1, 2016 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 1, 2016

Migrated from rt.perl.org#129991 (status was 'resolved')

Searchable as RT129991$

@p5pRT
Copy link
Author

p5pRT commented Nov 1, 2016

From @geeknik

Triggered in v5.25.7 (v5.25.6-134-g11327fa).

perl -e '($0,$_,$0)=(/()()/,0)for 0gt 0'

perl​: pp_hot.c​:1167​: void S_aassign_copy_common(SV **, SV **, SV **, SV **,
_Bool)​: Assertion `!(((svl)->sv_flags & (0x08000000|0x00010000)) &&
((svl)==&PL_sv_undef || (svl)==&PL_sv_yes || (svl)==&PL_sv_no ||
(svl)==&PL_sv_placeholder))' failed.
Aborted

@p5pRT
Copy link
Author

p5pRT commented Nov 8, 2016

From @tonycoz

On Mon, 31 Oct 2016 22​:26​:45 -0700, brian.carpenter@​gmail.com wrote​:

Triggered in v5.25.7 (v5.25.6-134-g11327fa).

perl -e '($0,$_,$0)=(/()()/,0)for 0gt 0'

perl​: pp_hot.c​:1167​: void S_aassign_copy_common(SV **, SV **, SV **, SV **,
_Bool)​: Assertion `!(((svl)->sv_flags & (0x08000000|0x00010000)) &&
((svl)==&PL_sv_undef || (svl)==&PL_sv_yes || (svl)==&PL_sv_no ||
(svl)==&PL_sv_placeholder))' failed.
Aborted

Simplifies to​:

  perl -e '($_,$0)=(1,0)for 0gt 0'

I'm not sure that particular assertion is needed.

Tony

@p5pRT
Copy link
Author

p5pRT commented Nov 8, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 9, 2016

From @iabyn

On Mon, Nov 07, 2016 at 09​:09​:27PM -0800, Tony Cook via RT wrote​:

On Mon, 31 Oct 2016 22​:26​:45 -0700, brian.carpenter@​gmail.com wrote​:

Triggered in v5.25.7 (v5.25.6-134-g11327fa).

perl -e '($0,$_,$0)=(/()()/,0)for 0gt 0'

perl​: pp_hot.c​:1167​: void S_aassign_copy_common(SV **, SV **, SV **, SV **,
_Bool)​: Assertion `!(((svl)->sv_flags & (0x08000000|0x00010000)) &&
((svl)==&PL_sv_undef || (svl)==&PL_sv_yes || (svl)==&PL_sv_no ||
(svl)==&PL_sv_placeholder))' failed.
Aborted

Simplifies to​:

perl -e '($_,$0)=(1,0)for 0gt 0'

I'm not sure that particular assertion is needed.

It was there to see if I could get away with only having to check for
PL_sv_undef on the LHS, not PL_sv_yes etc too. Turns out I need to check
for the other immortals too, which is a bit more expensive. Now fixed with
v5.25.6-184-g94a5f65.

While looking at that, I noticed that RO immortals on the LHS are silently
skipped rather than croaking; this contrasts with scalar assign​:

  $ ./perl -e'$_ = 1 for 0 ge 0'
  Modification of a read-only value attempted at -e line 1.
  $ ./perl -e'($_) = (1) for 0 ge 0'
  $

I wonder whether this is deliberate / correct. The 5.000 src does indeed
have this line in pp_aassign()​:

  if (sv != &sv_undef && sv != &sv_yes && sv != &sv_no)
  DIE(no_modify);

So perhaps I should let sleeping dogs lie.

--
More than any other time in history, mankind faces a crossroads. One path
leads to despair and utter hopelessness. The other, to total extinction.
Let us pray we have the wisdom to choose correctly.
  -- Woody Allen

@p5pRT
Copy link
Author

p5pRT commented Jan 24, 2017

@iabyn - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

From @khwilliamson

Thank 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
resolved.

Perl 5.26.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.26.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT p5pRT closed this as completed May 30, 2017
@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant