Linking cython against the static libpython in a python install compiled with shared libraries causes a glibc error that a double free or corruption was found while importing site. I don't think it is cython's fault. Happens on RHEL6.6. Linux anotheruvula 2.6.32-504.30.3.el6.x86_64 #1 SMP Thu Jul 9 15:20:47 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) I am attaching a shell script which demonstrates the problem.
I don't reproduce the crash, but I noticed that the binary imports and executes the system's /usr/lib/python2.7/site.py. I think it's cython's fault (or maybe the way you use it): "cython --embed" is not really isolated from the rest of the system, so it can only be used with the system's Python.
wcolburn@anotheruvula</home/anotheruvula/python/debug>$ strace doublefree 2>&1 | grep site.py open("/home/anotheruvula/python/debug/pybug/lib/python2.7/site.py", O_RDONLY) = 3 open("/home/anotheruvula/python/debug/pybug/lib/python2.7/site.pyc", O_RDONLY) = 4 *** glibc detected *** doublefree: double free or corruption (out): 0x00007fa1eb491030 *** ======= Backtrace: ========= It's pulling in it's own site.py, not the system site.py when I do it.
As Python 2.7 is now at end-of-life, I'm closing this issue. If you can still reproduce the problem with a modern version of Python (3.6-3.8), please reopen it.
History
Date
User
Action
Args
2022-04-11 14:58:23
admin
set
github: 69649
2020-04-27 01:50:48
zach.ware
set
status: open -> closednosy: + zach.waremessages: + resolution: out of datestage: resolved