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
LLVM Optimization Pass Crash on Merge successive reallocations of the same variable #3126
Comments
I'm unable to reproduce on MacOS El Capitan Ponyc 0.28.0 built with LLVM 7.0.1 |
Also unable to reproduce using Ubuntu Bionic with Ponyc 0.28.0 built with vendored LLVM 7.0.1 |
@Jwashton would you be able to build a version of ponyc from source, use that and see if you run into an issue? If you have a lot of horsepower to throw at it and time, you could try using our "vendored" LLVM. That means you'd be building LLVM and then statically linking it in:
|
I can't seem to reproduce this issue with a locally built version of ponyc and the system LLVM. Now recompiling with the vendored LLVM... |
For the locally built, can you post the |
|
So this could be an llvm 3.9.1 issue. |
I am able to reproduce this using MacOS, latest ponyc and llvm 3.9.1. So, this would be somehow related to the llvm version. |
Can anyone else triage and verify my findings? |
This could exist in other non-LLVM 7 versions, if anyone can test for that, it would be great. |
I can try testing this in conjunction with #3122 for multiple LLVM versions. |
I tested this on my Arch Linux desktop:
I tried 7.0.1 and 3.9.1:
It worked 10 times with 7.0.1 and failed 5 in 10 times with 3.9.1:
|
While testing #3122 I created a debug version of llvm-3.9.1 and linked it to a release version of ponyc:
Here is the version info:
I then tested it in the loop as before and all 10 succeeded. I'm not sure what that proves but its a data point that seems to point to a problem in LLVM as in this test and in my other test pony was compiled in Release mode:
|
If this is looking like a bug in earlier versions of LLVM, I'm tempted to say we shouldn't bother investigating further until it's been reproduced on a more recent version of LLVM. |
Managed to reproduce this behaviour on LLVM 7.1.0 with the following code: actor Main
let a: Array[(U64, U64)] = [as (U64, U64):
(0,0); (1,0); (2,0); (3,0); (4,0); (5,0); (6,0)
(7,0); (8,0); (9,0); (0,2); (9,2); (0,3); (9,3)
(0,4); (9,4); (0,5); (9,5); (0,6); (9,6); (0,7)
(9,7); (0,8); (9,8); (0,9); (1,9); (2,9); (3,9)
(4,9); (5,9); (6,9); (7,9); (8,9)
]
new create(env: Env) => None (although the code works correctly in the pony playground) Compiling the above:
This is on macOS Mojave 10.14.6,
|
Not an issue with LLVM version we currently support. |
@SeanTAllen I can still reproduce this crash on my machine (macOS Mojave 10.14.6) with the example I posted in my comment above. This is with LLVM 9.0.1
|
@ergl can you open a new issue? |
I'm going through the this book. When I compile my tests on this branch of my code I sometimes get this issue during the optimization step.
Sometimes it works, sometimes it doesn't. Sometimes the issue disappears if I just try to compile again. Other times I find that any change I make to the code will make it go away (for example commenting out any one of the test suites in
test/main.pony
). This fact has so far frustrated my attempts to make a more minimal test case, but I'll keep trying.Is the issue perhaps related to this loop from the
_TestCanvas
test?This is on Fedora 29, kernel 5.0.4-200, using ponyc straight from the Fedora copr repository, per the readme.
I'm very willing to provide more information upon request.
The text was updated successfully, but these errors were encountered: