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

Tang, Guang gtang at bcm.tmc.edu
Thu Dec 6 18:56:24 CET 2007


Thanks for your reply.
My application wraps a bunch of c++ classes to Python, the building process is managed by CMake.
To simplify the problem. I replace one of the wrapped class to Hello class in the tutorial of boost.python. But I still get this segfault at exit.

Grant

"Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com> wrote in message news:<87524.14387.qm at web31112.mail.mud.yahoo.com>...
> 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
> 
> 
> 
> 



More information about the Cplusplus-sig mailing list