[svn:mod_parrot] r308 - in mod_parrot/trunk: . lib lib/Apache src

[email protected]
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Tue Jan  8 14:28:09 2008
New Revision: 308

Modified:
   mod_parrot/trunk/call_list.txt
   mod_parrot/trunk/lib/Apache/RequestRec.pir
   mod_parrot/trunk/lib/mod_parrot.pir
   mod_parrot/trunk/src/nci.c

Log:
wrap NCI call to ap_log_rerror to fix stack smashing on x86_64


Modified: mod_parrot/trunk/call_list.txt
==============================================================================
--- mod_parrot/trunk/call_list.txt	(original)
+++ mod_parrot/trunk/call_list.txt	Tue Jan  8 14:28:09 2008
@@ -17,4 +17,4 @@
 v       p
 v       pit
 v       ptt
-v       tiiiptt
+v       Jtiiipt

Modified: mod_parrot/trunk/lib/Apache/RequestRec.pir
==============================================================================
--- mod_parrot/trunk/lib/Apache/RequestRec.pir	(original)
+++ mod_parrot/trunk/lib/Apache/RequestRec.pir	Tue Jan  8 14:28:09 2008
@@ -62,9 +62,6 @@
     dlfunc func, nul, "ap_rputc", "iip"
     set_root_global [ 'Apache'; 'NCI' ], "ap_rputc", func
 
-    dlfunc func, nul, "ap_log_rerror", "vtiiiptt"
-    set_root_global [ 'Apache'; 'NCI' ], "ap_log_rerror", func
-
     dlfunc func, nul, "ap_is_initial_req", "ip"
     set_root_global [ 'Apache'; 'NCI' ], "ap_is_initial_req", func
 
@@ -220,8 +217,8 @@
     .local pmc ap_log_rerror
 
     getattribute r, self, 'r'
-    ap_log_rerror = get_root_global [ 'Apache'; 'NCI' ], 'ap_log_rerror'
-    ap_log_rerror( file, line, level, 0, r, "%s", msg )
+    ap_log_rerror = get_root_global [ '_modparrot'; 'NCI' ], 'ap_log_rerror'
+    ap_log_rerror( file, line, level, 0, r, msg )
 .end
 
 =item C<(INT, STRING) = get_basic_auth_pw()>

Modified: mod_parrot/trunk/lib/mod_parrot.pir
==============================================================================
--- mod_parrot/trunk/lib/mod_parrot.pir	(original)
+++ mod_parrot/trunk/lib/mod_parrot.pir	Tue Jan  8 14:28:09 2008
@@ -54,6 +54,9 @@
     dlfunc func, nul, "mpnci_rwrite", "iJPip"
     set_root_global [ '_modparrot'; 'NCI' ], "rwrite", func
 
+    dlfunc func, nul, "mpnci_ap_log_rerror", "vJtiiipt"
+    set_root_global [ '_modparrot'; 'NCI' ], "ap_log_rerror", func
+
     dlfunc func, nul, "mpnci_conf_pool", "pJ"
     set_root_global [ '_modparrot'; 'NCI' ], "conf_pool", func
 

Modified: mod_parrot/trunk/src/nci.c
==============================================================================
--- mod_parrot/trunk/src/nci.c	(original)
+++ mod_parrot/trunk/src/nci.c	Tue Jan  8 14:28:09 2008
@@ -170,3 +170,9 @@
 {
     return (char *)modparrot_backtrace(interp);
 }
+
+void mpnci_ap_log_rerror(Parrot_Interp interp, char *file, int line, int level,
+    apr_status_t status, request_rec *r, char *msg)
+{
+    ap_log_rerror(file, line, level, status, r, "%s", msg);
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.