[C++-sig] boost.python program crash Python interpreter at exit on Fedora 8

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Thu Dec 6 17:01:31 CET 2007


My guess is there is a general memory access violation, but you're getting
lucky on the other platforms. I'd run valgrind to find out what's going
on. valgrind should come with Fedora 8. If not, installing from sources
is quick and easy.
You need Python-specific suppressions for valgrind. The suppression
file comes with the Python sources. I think it is called valgrind-python.supp,
probably in the Misc subdirectory.
If you compile your extension with -g valgrind will give you source
code line numbers.
Ralf

----- Original Message ----
From: Grant Tang <grant.tang at gmail.com>
To: c++-sig at python.org
Sent: Wednesday, December 5, 2007 8:52:09 PM
Subject: [C++-sig] boost.python program crash Python interpreter at exit on Fedora 8


My application uses boost.pyhton to wrap c++ core to Python. It works fine on 
Linux, WinXP and Mac OSX. On the recently released Fedora 8, it functions 
correctly but always causes segmentation fault when exit Python:

>>>import MyAPP
>>>exit()
Segmentaion fault

put the exit() function in try/catch shows it's a SystemExit exception 
raised in exit() function.

If I run Python in GDB, it gives this info at exit():

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912496267664 (LWP 158127)]
0x00002aaab20885cd in rename () from /lib64/libselinux.so.1

I doubt it's releated to SELinux on Fedora. But the problem exists even if I 

turn off SELinux.

Can anybody tell me what's the problem here and why it only happens in Fedora 8? 


-- 
Grant



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20071206/80e3a37d/attachment.htm>


More information about the Cplusplus-sig mailing list