Replies: 1 comment 1 reply
-
Did you try attaching with debugger? See how to debug "Segmentation faults" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
(1) CMake successfully compiles the code (a mixture of C++ and C) and generates the python module, say
foo.cpython-310-x86_64-linux-gnu.so
.(2) Python script didn't report any linkage or python version error when importing the module
import foo
.(3) Assume the
foo
module also depends on a pure C shared libraryA.so
andA.so
contains the definition of a method calledRun
. When the C++ source code of modulefoo
(decorated byextern "C"
for C linkage) trying to call theRun
routine inA.so
, the program getsSegmentation fault (core dumped)
.(4) BTW, the same program also compiles and generates an executable in addition to the python module. The executable can successfully run without this problem with the same input.
Do you have any idea what's the problem and how I can avoid such puzzling issue?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions