Segmentation fault
sbeschke opened this issue · 2 comments
sbeschke commented
I decided to try out circa today and cloned the git repository. I got it to build without trouble; however, the resulting binary segfaults.
I'm running an up-to-date Arch Linux on an x86 machine.
Here's the backtrace of the crash:
(gdb) r
Starting program: /home/sebastian/programs/circa/build/circa
Program received signal SIGSEGV, Segmentation fault.
0x0807c88d in circa::unique_name (term=0x0) at build/release/src/introspection.cpp:90
90 return term->uniqueName.name.c_str();
(gdb) bt
#0 0x0807c88d in circa::unique_name (term=0x0) at build/release/src/introspection.cpp:90
#1 0x080970d2 in circa::branch_update_state_type (branch=0x80ddba8) at build/release/src/stateful_code.cpp:152
#2 0x08083280 in circa::set_branch_in_progress (branch=0x80ddba8, inProgress=false) at build/release/src/building.cpp:792
#3 0x08089705 in circa::parser::compile (branch=0x80ddba8,
step=0x808cd91 <circa::parser::function_decl(circa::Branch*, circa::TokenStream&, circa::parser::ParserCxt*)>, input=...)
at build/release/src/parser.cpp:40
#4 0x0807b75e in circa::create_overloaded_function (branch=0x80ddba8, header=0x80b2006 "add(any,any) -> any") at build/release/src/generic.cpp:65
#5 0x0805abb4 in circa::bootstrap_kernel () at build/release/src/kernel.cpp:881
#6 0x0805c88e in circa::circa_initialize () at build/release/src/kernel.cpp:1076
#7 0x0804aacc in main (argc=1, args=0xbffff7d4) at build/release/src/main.cpp:11
(gdb) frame
#0 0x0807c88d in circa::unique_name (term=0x0) at build/release/src/introspection.cpp:90
90 return term->uniqueName.name.c_str();
Is this specific to my system or just a general bug?
p-h commented
The bug is specific to Arch because /usr/bin/python is Python3, the solution is the change the all the Shebangs to /usr/bin/python2
sbeschke commented
Thank you for the quick answer. Specifically, the shebang in extras/alchemy/build-lib.py seems to have been causing the problem.