<div dir="ltr">Hi swift team,<div><br></div><div>I download the prebuilt swift 4.0 from <a href="https://swift.org/builds/swift-4.0-release/ubuntu1404/swift-4.0-RELEASE/swift-4.0-RELEASE-ubuntu14.04.tar.gz">here</a> and try to do some work on the generated LLVM BC. However, I got a seg fault when running the binary executable compiled from bitcode as shown below:</div><div><br></div><div><font color="#0000ff" face="monospace, monospace">$ cat hello.swift<br></font></div><div><div><font color="#0000ff" face="monospace, monospace">print(&quot;Hello World&quot;)</font></div><div><font color="#0000ff" face="monospace, monospace">$ swiftc hello.swift -emit-bc -o hello.bc</font></div><div><font color="#0000ff" face="monospace, monospace">$ clang++ hello.bc -c -o hello.o</font></div><div><font color="#0000ff" face="monospace, monospace">$ swiftc hello.o -o hello</font></div><div><font color="#0000ff" face="monospace, monospace">$ ./hello</font></div><div><font color="#0000ff" face="monospace, monospace">Segmentation fault (core dumped)</font></div><div><br></div><div>It works fine if no bitcode file is involved here.</div><div><br></div><div><font color="#0000ff" face="monospace, monospace">$ swiftc hello.swift -c -o hello.o</font></div><div><font color="#0000ff" face="monospace, monospace">$ swiftc hello.o -o hello</font></div><div><font color="#0000ff" face="monospace, monospace">$ ./hello</font></div><div><font color="#0000ff" face="monospace, monospace">Hello World</font></div><div><br></div><div>I am running Ubuntu 14.04.3 (kernel 4.8.0). I also encountered the same seg fault if I use the prebuilt swift 3.1.1</div></div><div><br></div><div>Is it the right way to compile the bitcode generated from swift? Or is it a bug in swift ?</div><div><br></div><div>Thanks a lot in advance!</div><div><br></div><div>Best regards,</div><div>Jeffrey</div><div><br></div></div>