Randy Kobes wrote:

On Fri, 19 Sep 2003, Stas Bekman wrote:
[ .. ]


It's possible that logfile contains a seemingly valid
apr_file_t, but if for some reason s->error_log is
closed/reopened, leaving invalid pointer in logfile.

remember that modperl_trace_level_set will be called at least twice
(start+restart).

But may be first try this temp patch:

Index: src/modules/perl/modperl_log.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_log.c,v
retrieving revision 1.8
diff -u -r1.8 modperl_log.c
--- src/modules/perl/modperl_log.c      3 Apr 2003 06:25:26 -0000       1.8
+++ src/modules/perl/modperl_log.c      19 Sep 2003 17:47:58 -0000
@@ -2,6 +2,7 @@
 #include "apr_lib.h"
 #include "modperl_trace.h"
 #include "modperl_log.h"
+#include "mod_perl.h"

#undef getenv /* from XSUB.h */

@@ -28,6 +29,8 @@
     if (!logfile) {
         return;
     }
+
+    logfile = modperl_global_get_server_rec()->error_log;

     if (func) {
         apr_file_printf(logfile, "%s: ", func);




That works for me - thanks, Stas!


Works for me too. I've now got 700kB+ in the error_log from running the testsuite. That looks better!

I changed the patch that I applied very slightly to the attached, which seems to make a little more sense to me.

- Steve
--- modperl_log.c.orig  2003-04-03 07:25:26.000000000 +0100
+++ modperl_log.c       2003-09-22 09:05:17.081033600 +0100
@@ -2,6 +2,7 @@
 #include "apr_lib.h"
 #include "modperl_trace.h"
 #include "modperl_log.h"
+#include "mod_perl.h"
 
 #undef getenv /* from XSUB.h */
 
@@ -25,6 +26,8 @@
     apr_size_t vstr_len = 0;
     va_list args;
 
+    logfile = modperl_global_get_server_rec()->error_log;
+
     if (!logfile) {
         return;
     }
@@ -67,7 +70,5 @@
 
     debug_level |= 0x80000000;
 
-    logfile = s->error_log; /* XXX */
-
     MP_TRACE_a_do(MP_TRACE_dump_flags());
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to