Uh oh!
There was an error while loading. Please reload this page.
Fix emitting asm and object file output at the same time - #30452
Conversation
rust-highfive
commented
Dec 18, 2015
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
dotdash
commented
Dec 18, 2015
@pythonesque / @alexcrichton could one of you check whether this actually adresses #26235? I can't reproduce the problem on linux, but I believe that it is fixed by this. |
alexcrichton
commented
Dec 18, 2015
Applying locally to see if this works out, but from #26235 it looks like it wasn't the compiler itself segfaulting but rather the binary that was generated, so could the test here also run the output binary? This seems like a pretty reasonable solution to me though at least! |
alexcrichton
commented
Dec 18, 2015
I've confirmed that this does indeed fix #26235! With that in mind, r=me if the binaries in run-make are actually executed. |
dotdash
commented
Dec 18, 2015
@alexcrichton Oh, oops, forgot to add the test for #26235, the ones included are just for #24876. Will add the missing one. |
dotdash
commented
Dec 18, 2015
@bors r=alexcrichton Thanks for testing this Alex! |
bors
commented
Dec 18, 2015
📌 Commit 98474f3 has been approved by |
mitaa
commented
Dec 18, 2015
|
LLVM doesn't really support reusing the same module to emit more than one file. One bug this causes is that the IR is invalidated by the stack coloring pass when emitting the first file, and then the IR verifier complains by the time we try to emit the second file. Also, we get different binaries with --emit=asm,link than with just --emit=link. In some cases leading to segfaults. Unfortunately, it seems that at this point in time, the most sensible option to circumvent this problem is to just clone the whole llvm module for the asm output if we need both, asm and obj file output. Fixesrust-lang#24876Fixesrust-lang#26235
dotdash
commented
Dec 18, 2015
bors
commented
Dec 18, 2015
📌 Commit 88ffb26 has been approved by |
dotdash
commented
Dec 18, 2015
@bors r=alexcrichton Guess the bot doesn't like me talking to others as well? |
bors
commented
Dec 18, 2015
📌 Commit 88ffb26 has been approved by |
LLVM doesn't really support reusing the same module to emit more than one file. One bug this causes is that the IR is invalidated by the stack coloring pass when emitting the first file, and then the IR verifier complains by the time we try to emit the second file. Also, we get different binaries with --emit=asm,link than with just --emit=link. In some cases leading to segfaults. Unfortunately, it seems that at this point in time, the most sensible option to circumvent this problem is to just clone the whole llvm module for the asm output if we need both, asm and obj file output. Fixesrust-lang#24876Fixesrust-lang#26235
LLVM doesn't really support reusing the same module to emit more than
one file. One bug this causes is that the IR is invalidated by the stack
coloring pass when emitting the first file, and then the IR verifier
complains by the time we try to emit the second file. Also, we get
different binaries with --emit=asm,link than with just --emit=link. In
some cases leading to segfaults.
Unfortunately, it seems that at this point in time, the most sensible
option to circumvent this problem is to just clone the whole llvm module
for the asm output if we need both, asm and obj file output.
Fixes#24876
Fixes#26235