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

Crash with Symbol::delete_package and subref #15420

Closed
p5pRT opened this issue Jul 4, 2016 · 6 comments
Closed

Crash with Symbol::delete_package and subref #15420

p5pRT opened this issue Jul 4, 2016 · 6 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Jul 4, 2016

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

Searchable as RT128532$

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 4, 2016

From @cpansprout

From <577975CB.2080006@​alexbyk.com>​:

$ perl -MSymbol -E 'Symbol​::delete_package "My​::Foo"; \&My​::Foo​::foo;'
Segmentation fault

Bisect​:

186a5ba is the first bad commit
commit 186a5ba
Author​: Father Chrysostomos <sprout@​cpan.org>
Date​: Wed Jun 13 22​:46​:40 2012 -0700

  Don’t create pads for sub stubs
 
  Two code paths, sv_2cv (for \&name) and get_cvn_flags (for
  &{"name"}()) were using start_subparse and newATTRSUB to create a
  subroutine stub, which is what usually happens for Perl subs (with
  op trees).
 
  This resulted in subs with unused pads attached to them, because
  start_subparse sets up the pad, which must be accessible dur-
  ing parsing.
 
  One code path, gv_init, which (among other things) reifies a GV after
  a sub declaration (like ‘sub foo;’, which for efficiency doesn’t
  create a CV), created the subroutine stub itself, without using
  start_subparse/newATTRSUB.
 
  This commit takes the code from gv_init, makes it more generic so it
  can apply to the other two cases, puts it in a new function called
  newSTUB, and makes all three locations call it.
 
  Now stub creation should be faster and use less memory.
 
  Additionally, this commit causes sv_2cv and get_cvn_flags to bypass
  bug #107370 (glob stringification not round-tripping properly). They
  used to stringify the GV and pass the string to newATTRSUB (wrapped in
  an op, of all things) for it to look up the GV again. While bug
  been fixed, as it was a side effect of sv_2cv triggering bug #107370.

--

Father Chrysostomos

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 4, 2016

From @cpansprout

On Sun Jul 03 18​:11​:32 2016, sprout wrote​:

From <577975CB.2080006@​alexbyk.com>​:

$ perl -MSymbol -E 'Symbol​::delete_package "My​::Foo"; \&My​::Foo​::foo;'
Segmentation fault

This bug is now fixed in commit 63aab7e.

--

Father Chrysostomos

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 4, 2016

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

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 4, 2016

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

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT 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

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT 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
Projects
None yet
1 participant
You can’t perform that action at this time.