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

[Truffle] Expected Absolute Value for Fixnum #2781

Closed
bjfish opened this issue Mar 30, 2015 · 3 comments · Fixed by #2782
Closed

[Truffle] Expected Absolute Value for Fixnum #2781

bjfish opened this issue Mar 30, 2015 · 3 comments · Fixed by #2782
Assignees
Milestone

Comments

@bjfish
Copy link
Contributor

bjfish commented Mar 30, 2015

Code Example:

puts (-2**63).abs

Expected:

9223372036854775808

Actual

-9223372036854775808
@chrisseaton
Copy link
Contributor

This is caused by FixnumNodes.AbsNode not checking for overflow.

@chrisseaton chrisseaton added this to the truffle-dev milestone Mar 30, 2015
@chrisseaton chrisseaton self-assigned this Mar 30, 2015
@bjfish bjfish changed the title [Truffle] Expected Absolute Value for Fix [Truffle] Expected Absolute Value for Fixnum Mar 30, 2015
@bjfish
Copy link
Contributor Author

bjfish commented Mar 30, 2015

@chrisseaton I could try to fix this if you haven't started on it

@chrisseaton
Copy link
Contributor

Go for it.

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 a pull request may close this issue.

3 participants