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
Error assigning to hashref slice when running debug/taint #2127
Comments
From tuck@whistlingfish.netCreated by tuck@whistlingfish.netThe following code generates an error when running in debug or taint my $foo = {}; The error is: Bizarre copy of HASH in leave at /home/tuck/projects/try line 9. When running without -T or -d enabled, it works fine. Perl Info
|
From @mjdominus
Thanks. Although Perl shouldn't generate that error, and it is @{$foo}{qw(foo bar)} = qw(foo bar); instead. |
From [Unknown Contact. See original ticket]-- Mark-Jason Dominus <mjd@plover.com> spake thusly:
Interesting. When I was trying to figure out how to do the equivalent Thanks for setting me straight. - Matt |
From @iabyn(Just reviewing ancient bugs). This bug report can be reduced to: $ perl -T -e '@{%h}{x}' and is still current in bleedperl@19374. The problem is best explained by comparison to $ perl -T -e '@{%h}' which works okay. In this latter case, the enter/leave block that This difference is due to the fact that the rv2hv op that pushes %h on the The flag is set because @{%h}{'x'} is initially parsed as @{%h}, but when term: ary '{' expr ';' '}' /* @hash{@keys} */ Since oopsHV both calls and is called by Perl_ref(), this causes the The bug only appears in taint mode (or with -d), since otherwise the No, I don't know how to fix this. Dave. -- |
Migrated from rt.perl.org#3420 (status was 'resolved')
Searchable as RT3420$
The text was updated successfully, but these errors were encountered: