-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Compile error: "Pass 'Move heap allocations to the stack' is not initialized" #1225
Comments
Pull docker image
Checkout and build
Output as above
|
As I noted in #1236, the problem is not reproducing on llvm-3.9 |
As @Praetonus pointed out in #1236, this looks like it could be an LLVM 3.8 bug, in combination with gcc 6. |
Could we get away, once 3.9 is in place with advising people not to use LLVM 3.8? |
Does this error occur when using LLVM 3.8.1? |
In the absence of other info, we are assuming this was a llvm 3.8.0 bug. To anyone reading in the future, if you experience this with 3.8.1 or other supported LLVMs please open a new issue. |
@SeanTAllen I have this issue on llvm 3.8.1 should I actually open a new issue now? |
@fgrosse are you using gcc 6? |
I had this issue on two different machines with llvm 3.8.1 installed on Linux Fedora 25 via the package manager
I did now install a more recent LLVM version by building version 3.9.1 from source and was able to compile and run |
So the supposition that it is a LLVM 3.8.x and GCC 6.x issue appears to be accurate. |
Hello there, I just tried building ponyc 0.13.1 from source, on Fedora 25 with LLVM 3.9.1 and gcc 6.3.1, but still had this exact issue:
|
@avsej when you had this issue, were you using gcc 6.3.1? So far reported gcc versions are all 6.3.1. This is looking like a GCC specific issue to me. |
Hi, I tried building from source with tags 0.13.1 and 0.13.2 with both gcc and clang using LLVM 3.9.1 libs on Fedora 25 and they all segfault the same way described above. All stacktraces in these cases start with these: Below you can find the versions I tried. 0.13.1-874c0f8 [release] 0.13.1-874c0f8 [release] 0.13.2-e3c67a3 [release] 0.13.2-e3c67a3 [release] |
The problem only arises with optimization. If I use So then I saw this: http://stackoverflow.com/questions/30114849/crash-on-au-addrequiredloopinfo-in-llvm-pass And tried this: diff --git a/src/libponyc/codegen/genopt.cc b/src/libponyc/codegen/genopt.cc
index 9a43610..ab367d9 100644
--- a/src/libponyc/codegen/genopt.cc
+++ b/src/libponyc/codegen/genopt.cc
@@ -450,6 +450,7 @@ static void addHeapToStackPass(const PassManagerBuilder& pmb,
PassManagerBase& pm)
{
if(pmb.OptLevel >= 2)
+ pm.add(new DominatorTreeWrapperPass());
pm.add(new HeapToStack());
}
...and now it works! |
@KaroLaunonen this patch (with some added curly brackets) seems to fix the issue on my end |
@KaroLaunonen you up for opening a PR? |
@LaurentTreguier Ouch, that was embarrassing with those curly brackets. Thanks for pointing out! Pony syntax had already stuck on me. :) |
Resolved by #1910 - thanks to @KaroLaunonen and everyone else who contributed to the troubleshooting. |
I've just tried to build trivial helloworld from
tutorial, and it fails to compile. I've tried the build from bintray
and manually compiled, all of the output something like this:
Backtrace:
Although when I disable optimizations (-d) it works as expected
The text was updated successfully, but these errors were encountered: