[llvm-dev] Help with segfault in llvm_shutdown with LLVM 5.0 Release build
Diptorup Deb via llvm-dev
llvm-dev at lists.llvm.org
Tue Sep 19 18:14:18 PDT 2017
On 09/19/2017 01:49 PM, Friedman, Eli wrote:
> See https://reviews.llvm.org/D33515 for context. I thought we fixed the
> problem, but it looks like you found some other way to trigger it.
Thanks for the reference.
I realized after sending the last email that I missed two details.
First, our module is an out-of-tree pass. Second, we are using
add_library(Canary MODULE Canary.cpp).
Using the CMakeLists.txt from the patch you referred to as a reference I
tried couple of changes in our CMakeLists.txt.
A) Changed the add_library command to SHARED_LIB
B) Added target_link_libraries(CanaryPass LLVMipo)
Now I am getting the following error:
opt: CommandLine Error: Option 'enable-partial-inlining' registered more
than once!
LLVM ERROR: inconsistency in registered CommandLine options
-----
Additionally, in case it is useful in identifying the issue. My
development environment has two LLVM 5.0 installs, a Debug and a Release
mode respectively. The problem happens when I build the module with the
Release mode clang, while also using the Release mode install path as my
LLVM_ROOT. If I use the Debug mode install path as the LLVM_ROOT, then
things work fine.
Also, I was able to build our module using GCC 6.3 and then load the
module into the Release mode's opt, without triggering the segfault.
Best,
Dipto
More information about the llvm-dev
mailing list