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

Regression with eval "__PACKAGE__" and stash manipulation #13657

Open
p5pRT opened this issue Mar 12, 2014 · 3 comments
Open

Regression with eval "__PACKAGE__" and stash manipulation #13657

p5pRT opened this issue Mar 12, 2014 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 12, 2014

Migrated from rt.perl.org#121425 (status was 'open')

Searchable as RT121425$

@p5pRT
Copy link
Author

p5pRT commented Mar 12, 2014

From @Hugmeir

perl -le 'package Foo; package Bar; *Bar​:: = \%Foo​::; print eval
"__PACKAGE__"'

Same issue but with a slight variation​:

perl -le 'package Foo; package Bar; $​::{"Bar​::"} = *Foo​::; print eval
"__PACKAGE__"'

This used to 'work' in some earlier versions (<= 5.16) if Perl was compiled
with threads and without debugging. It segfaults/fails assertions on 5.18,
and returns undef in 5.19.

@p5pRT
Copy link
Author

p5pRT commented Mar 12, 2014

From @jkeenan

On Wed Mar 12 04​:40​:14 2014, Hugmeir wrote​:

perl -le 'package Foo; package Bar; *Bar​:: = \%Foo​::; print eval
"__PACKAGE__"'

Same issue but with a slight variation​:

perl -le 'package Foo; package Bar; $​::{"Bar​::"} = *Foo​::; print eval
"__PACKAGE__"'

This used to 'work' in some earlier versions (<= 5.16) if Perl was compiled
with threads and without debugging. It segfaults/fails assertions on 5.18,
and returns undef in 5.19.

Data​: From Dromedary, blead at commit 8842e23​:

#####
[dromedary-001​:perl] 1003 $ perl -le 'package Foo; package Bar; *Bar​:: = \%Foo​::; print eval "__PACKAGE__"'
perl​: hv.c​:364​: Perl_hv_common​: Assertion `((svtype)((hv)->sv_flags & 0xff)) == SVt_PVHV' failed.
Aborted

[dromedary-001​:perl] 1004 $ perl -le 'package Foo; package Bar; $​::{"Bar​::"} = *Foo​::; print eval "__PACKAGE__"'
perl​: hv.c​:364​: Perl_hv_common​: Assertion `((svtype)((hv)->sv_flags & 0xff)) == SVt_PVHV' failed.
Aborted
#####

@p5pRT
Copy link
Author

p5pRT commented Mar 12, 2014

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

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

2 participants