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

my $x : attr is not treated as one argument #14552

Open
p5pRT opened this issue Mar 1, 2015 · 3 comments
Open

my $x : attr is not treated as one argument #14552

p5pRT opened this issue Mar 1, 2015 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 1, 2015

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

Searchable as RT123962$

@p5pRT
Copy link
Author

p5pRT commented Mar 1, 2015

From @cpansprout

Attributes applied to a scalar confuse the code that checks the number of arguments.

$ perl -e 'caller my $x : m'
Too many arguments for caller at -e line 1, at EOF
Execution of -e aborted due to compilation errors.

caller takes one argument and I supplied one argument.

$ perl -le 'sub MODIFY_SCALAR_ATTRIBUTES{()} $,=" " ; print 1,2,3,(atan2 my $x : m),4,5,6'
1 2 1.5707963267949 4 5 6

atan2 takes two arguments, but I only supplied one, and corrupted the stack in the process. (What happened to the 3?)

This bug exists in bleadperl, and goes back at least to 5.12, and probably to 5.6.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Mar 1, 2015

From @cpansprout

On Sun Mar 01 13​:06​:03 2015, sprout wrote​:

Attributes applied to a scalar confuse the code that checks the number
of arguments.

$ perl -e 'caller my $x : m'
Too many arguments for caller at -e line 1, at EOF
Execution of -e aborted due to compilation errors.

caller takes one argument and I supplied one argument.

$ perl -le 'sub MODIFY_SCALAR_ATTRIBUTES{()} $,=" " ; print
1,2,3,(atan2 my $x : m),4,5,6'
1 2 1.5707963267949 4 5 6

atan2 takes two arguments, but I only supplied one, and corrupted the
stack in the process. (What happened to the 3?)

This bug exists in bleadperl, and goes back at least to 5.12, and
probably to 5.6.

If we fix this, we may be able to revert the C part of 6b2b48a.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Mar 1, 2015

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