segfault in extension module
From: Nathaniel Echols (echols_at_OCF.Berkeley.EDU)
Date: 12/01/03
- Next message: Francis Avila: "Re: List files without extension, was: Bug in glob.glob for files w/o extentions in Windows"
- Previous message: Diez B. Roggisch: "Re: how to show a bitmap?"
- Next in thread: Martin v. Löwis: "Re: segfault in extension module"
- Reply: Martin v. Löwis: "Re: segfault in extension module"
- Reply: Miki Tebeka: "Re: segfault in extension module"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Nov 2003 16:19:45 -0800
I've written a function in C to perform protein sequence alignment. This
works fine in a standalone C program. I've added the necessary packaging
to use it in Python; it returns three strings and an integer. However, as
soon as the function is complete, I get a segfault and the interpreter
dies.
If I run Python interactively, just calling the function causes a
segfault. If I'm running a script, I can actually print out the return
values (which are what I'd expect - so something's working) but as soon as
the script is done I get the segfault again. I can even call the function
twice, with different arguments - and it works both times. So it appears
that the problem is with tying up loose ends.
How do I determine what is going wrong? I do not get any problem like
this in the C version. I am not using free() anywhere - I will eventually
need to fix this, but I cannot find any place where I might be accessing
unavailable memory. (Adding in free() does not make any difference in the
module, for what it's worth, but I've had some issues with the C program
so I've left it out.)
[I've also tried using PyMem_Malloc instead, throughout the C code.
Doesn't help.]
thanks,
Nat
(please reply directly!)
- Next message: Francis Avila: "Re: List files without extension, was: Bug in glob.glob for files w/o extentions in Windows"
- Previous message: Diez B. Roggisch: "Re: how to show a bitmap?"
- Next in thread: Martin v. Löwis: "Re: segfault in extension module"
- Reply: Martin v. Löwis: "Re: segfault in extension module"
- Reply: Miki Tebeka: "Re: segfault in extension module"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|