This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author n0s69z
Recipients n0s69z
Date 2018-11-30.13:27:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1543584463.46.0.788709270274.issue35350@psf.upfronthosting.co.za>
In-reply-to
Content
Another small update:

After I recompiled Python with the commented out statement, I did a small test if loading a shared library works.

I compiled the following test function to testib.so:

#include <stdio.h>

void test_func(void);

void test_func(void) {
	printf("hello world\n");
}

After that I used ctypes to load this library and execute the test_func():

(gdb) file python2.7
Reading symbols from python2.7...done.
(gdb) run -c "import ctypes; lib_test = ctypes.cdll.LoadLibrary('/tmp/testlib.so'); lib_test.test_func();"
Starting program: /usr/bin/python2.7 -c "import ctypes; lib_test = ctypes.cdll.LoadLibrary('/tmp/testlib.so'); lib_test.test_func();"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
hello world

Program received signal SIGSEGV, Segmentation fault.
PyCFuncPtr_call (self=<optimized out>, inargs=<optimized out>, kwds=<optimized out>) at /home/user/ARM_Linux/src/Python-2.7.15/Modules/_ctypes/_ctypes.c:4108
4108    /home/user/ARM_Linux/src/Python-2.7.15/Modules/_ctypes/_ctypes.c: No such file or directory.
(gdb)

It prints the expected output, but again I get a segmentation fault, this time in PyCFuncPtr_call function.
History
Date User Action Args
2018-11-30 13:27:43n0s69zsetrecipients: + n0s69z
2018-11-30 13:27:43n0s69zsetmessageid: <1543584463.46.0.788709270274.issue35350@psf.upfronthosting.co.za>
2018-11-30 13:27:43n0s69zlinkissue35350 messages
2018-11-30 13:27:43n0s69zcreate