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] Array#pack issue #3547

Closed
bjfish opened this issue Dec 18, 2015 · 4 comments
Closed

[Truffle] Array#pack issue #3547

bjfish opened this issue Dec 18, 2015 · 4 comments
Assignees
Milestone

Comments

@bjfish
Copy link
Contributor

bjfish commented Dec 18, 2015

Expected

$ ruby -e 'puts ["metadata.gz", "0000444", "0000000", "0000000", "00000001244", "00000000044", "        ", " ", "0", nil, "ustar", "00", "wheel", "wheel", "0000000", "0000000", ""].pack("a100a8a8a8a12a12a7aaa100a6a2a32a32a8a8a155")'
metadata.gz0000444000000000000000000000124400000000044        0ustar00wheelwheel00000000000000

Actual

$ ./bin/jruby -X+T -e 'puts ["metadata.gz", "0000444", "0000000", "0000000", "00000001244", "00000000044", "        ", " ", "0", nil, "ustar", "00", "wheel", "wheel", "0000000", "0000000", ""].pack("a100a8a8a8a12a12a7aaa100a6a2a32a32a8a8a155")'
-e:1:in `pack': too few arguments (ArgumentError)
    from -e:1:in `<main>'

Found in rubygems.

@bjfish bjfish added the truffle label Dec 18, 2015
@chrisseaton chrisseaton added this to the truffle-dev milestone Jan 1, 2016
@chrisseaton chrisseaton self-assigned this Jan 1, 2016
@chrisseaton
Copy link
Contributor

This is caused by a bug in an optimisation where we attempt to recover loops in pack expressions so they can be vectorised. As of 64597b7 you can workaround by doing -Xtruffle.pack.recover=9999 and then it works.

@chrisseaton
Copy link
Contributor

Fixed in 23a6669.

@bjfish
Copy link
Contributor Author

bjfish commented Oct 25, 2016

Re-opening this because it has regressed. The workaround still works: -Xtruffle.pack.recover=9999.

I've added a spec for this error here: 83ca4b6

@bjfish bjfish reopened this Oct 25, 2016
@chrisseaton
Copy link
Contributor

Fixed in f9a5f31

@enebo enebo added this to the Non-Release milestone Dec 7, 2017
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

3 participants