[mod_python] more info about the segfault bug

Jeff Davis list-mod_python at empires.org
Fri Sep 13 14:36:39 EST 2002


Patch below. That variable "ext" is not being initialized appearently (in the 
function python_handler in mod_python.c). So I suppose it's not passing the 
"if(req->filename)" test, and so the call to apr_pstrcat just passes garbage 
("ext") to the function. Perhaps we need an "else" safety clause, or 
something? I don't really know what's supposed to be happening there, but if 
someone does maybe this will help them find the problem.

I will continue to look into the problem, but I'm not all that familiar with 
writing apache modules.


Regards,
	Jeff

Note: patch is from distributed version to me new one. Disregard my previous 
patch, which implemented Bryan Mongeau's solution.

--- mod_python.c.old	2002-09-13 13:51:09.000000000 -0700
+++ mod_python.c	2002-09-13 14:28:47.000000000 -0700
@@ -742,7 +742,7 @@
     int result;
     const char * interpreter = NULL;
     PyThreadState *tstate;
-    const char *ext;
+    char *ext = NULL;
     hl_entry *hle = NULL;
     hl_entry *dynhle = NULL;
 




More information about the Mod_python mailing list