Skip to content
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

Circle crashes while compiling a shared library #184

Open
SL-code opened this issue Aug 25, 2023 · 0 comments
Open

Circle crashes while compiling a shared library #184

SL-code opened this issue Aug 25, 2023 · 0 comments

Comments

@SL-code
Copy link

SL-code commented Aug 25, 2023

Hello, I'm trying to compile the 4coder editor with circle and I get a crash while compiling a shared library. The 4coder that I'm working on can be found here on the Monorepo branch.

To reproduce the crash:
Run from the root directory of the project the following command

circle -Icode -Icode/custom ./code/4ed_app_target.cpp --shared --fPIC  -o 4ed_library.so

by running this command in gdb I can extract the following backtrace

#0  0x000000000176af3b in llvm::removeUnreachableBlocks(llvm::Function&, llvm::DomTreeUpdater*, llvm::MemorySSAUpdater*) ()
#1  0x0000000001375f80 in simplifyFunctionCFG(llvm::Function&, llvm::TargetTransformInfo const&, llvm::DominatorTree*, llvm::SimplifyCFGOptions const&) ()
#2  0x0000000001375d41 in llvm::SimplifyCFGPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) ()
#3  0x000000000075ca45 in cg::cg_func_builder_t::define() ()
#4  0x000000000071a3db in cg::module_t::emit(cg::func_t&, bool, sema::odr_usage_t) ()
#5  0x000000000071a6bf in cg::module_t::emit(func_key_t, bool, sema::odr_usage_t) ()
#6  0x000000000071df9a in cg::codegen_t::emit(func_key_t, bool, sema::odr_usage_t) ()
#7  0x000000000071e4ec in cg::codegen_t::inject(sema::stmt_declaration_t*, sema::context_t&) ()
#8  0x000000000071dd0f in cg::codegen_t::inject_ast(sema::stmt_ns_t*, sema::context_t&) ()
#9  0x0000000000447655 in main ()

Here is a dump of all registers at the time of the crash

rax            0x0                 0
rbx            0x0                 0
rcx            0x7fffffffc3b8      140737488339896
rdx            0x2                 2
rsi            0x80                128
rdi            0x9042868           151267432
rbp            0x1                 0x1
rsp            0x7fffffffc170      0x7fffffffc170
r8             0x2                 2
r9             0xffffffffffffffff  -1
r10            0x0                 0
r11            0x7ffff7a3eac0      140737348102848
r12            0x1                 1
r13            0x0                 0
r14            0x9042868           151267432
r15            0x9042840           151267392
rip            0x176af3b           0x176af3b <llvm::removeUnreachableBlocks(llvm::Function&, llvm::DomTreeUpdater*, llvm::MemorySSAUpdater*)+1003>
eflags         0x10246             [ PF ZF IF RF ]
cs             0x33                51
ss             0x2b                43
ds             0x0                 0
es             0x0                 0
fs             0x0                 0
gs             0x0                 0

I've seen that others have reported crashes and they actually know the cause, sadly I do not have possible causes for this crash other then "it's a segmentation fault".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant