[mod_python] potential threading bug?

Jim Gallacher jpg at jgassociates.ca
Sat Sep 16 13:54:51 EDT 2006


Jean-Baptiste Nivoit wrote:
> Hi,
> 
> reading the source code to mod_python 3.2.10, i found that the "write" 
> method is defined twice in request_methods, that's probably harmless.

Harmless, but sloppy.

> And a second thing: in mod_python.c, in function get_interpreter, 
> there's a "return NULL;" that exits without releasing the PyEval lock at 
> line 213 when "interpreters" is not set (which never happens, i'm just 
> mentionning it for the sake of correctness).
> Anyway, that's just my reading of the source, i could be wrong.

I think you're right but it's likely harmless as well. I do like having 
symmetry in the code though, so like you, I'd be inclined to change it 
for the sake of correctness.

If you have an itch to dig into the C-code you might want to join the 
developer's list, where this sort of discussion is more appropriate.

To subscribe, send a message to python-dev-subscribe at httpd.apache.org

Jim


More information about the Mod_python mailing list