Skip to content

Conversation

zb226
Copy link

@zb226 zb226 commented Aug 30, 2025

This PR adds a todo-test for #13307 where a changed behavior involving @_ from perl 5.19.4 on was noted. Current blead perl still shows the same behavior.


  • This set of changes does not require a perldelta entry.

@jkeenan
Copy link
Contributor

jkeenan commented Aug 30, 2025

Our Continuous Integration system has reported one failing test in your pull request. We need you to add your name (preferably something more than a github ID) and email address to AUTHORS. Please run this program from the top of your git checkout:

perl Porting/updateAUTHORS.pl 

When you're done make sure you call:

$ git add AUTHORS
$ git commit
$ make test_porting && make test_harness

... and then re-push your branch. Thanks.

t/run/todo.t Outdated
Comment on lines 225 to 227
EOF
is($results, "undef\noooo\noooo\noooo", 'Hashref element reference in @_ disappeared; GH 13307');
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A build with -Accflags=-DPERL_RC_STACK returns oooo for every line, which seems like the most reasonable result, even though that differs from what 5.18.1 produced.

blead default:

tony@venus:.../git/perl6$ ./perl -Ilib -V:ccflags
ccflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2';
tony@venus:.../git/perl6$ ./perl ../13307.pl 
undef
oooo
undef
oooo

blead with -Accflags=-DPERL_RC_STACK:

tony@venus:.../git/perl6$ ./perl -Ilib -V:ccflags
ccflags='-DPERL_RC_STACK -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2';
tony@venus:.../git/perl6$ ./perl ../13307.pl 
oooo
oooo
oooo
oooo

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, does that mean this issue will be handled elsewhere or should the test be added still?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some thought, please make it check for the output I suggested and make the $::TODO conditional on "$Config{cc} $Config{ccflags} $Config{optimize}" !~ /-DPERL_RC_STACK\b/ - so it's a TODO test when -DPERL_RC_STACK is not found in those config variables.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And that means we want this test to still be added; and thank you for contributing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking more:

my $is_rc_stack = "$Config{cc} $Config{ccflags} $Config{optimize}" =~ /-DPERL_RC_STACK\b/;
local $::TODO = $is_rc_stack ? undef : "GH 13307";

so we don't skip the test, but run the test non-TODO for PERL_RC_STACK and TODO for non-PERL_RC_STACK.

Also:

#   Failed test 'Is authors_file 'AUTHORS' up to date?'
#   at Porting/updateAUTHORS.pl line 130.
#   File 'AUTHORS' changes:
#     would add: zb226                          <[email protected]>
# 
# Files need updating! You probably just need to run
# 
#    Porting/updateAUTHORS.pl
# 
# and commit the results.
# Looks like you failed 1 test of 5.
porting/authors.t ......... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests 

@zb226
Copy link
Author

zb226 commented Sep 3, 2025

Is this looking OK?

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

Successfully merging this pull request may close these issues.

5 participants