Stas Bekman wrote:
Richard Clarke wrote:

Stas,


Doesn't seem like an apreq problem. It happens in the modperl function.

Any

chance you can rebuild mod_perl with debug mode enabled (PERL_DEBUG=1), so

we

can see the arguments and file/linenumbers? See:
http://perl.apache.org/docs/1.0/guide/debug.html#PERL_DEBUG_1_Build_Option



Program received signal SIGBUS, Bus error.
0x80b445b in ap_unescape_url (url=0x8162e89 "") at util.c:1609
1609        url[x] = '\0';
(gdb) bt
#0  0x80b445b in ap_unescape_url (url=0x8162e89 "") at util.c:1609
#1  0x8085c20 in XS_Apache_unescape_url (cv=0x8227b0c) at Apache.c:931
Richard, attached is the real fix, which will be committed shortly. The problem is in the way perl's default typemap translates undefs into char *. It wasn't allocating any strings. The following does the right thing. I've tested that undefs are now happily accepted and you get a proper warnings under -w.

Index: src/modules/perl/Apache.xs
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
retrieving revision 1.125
diff -u -r1.125 Apache.xs
--- src/modules/perl/Apache.xs 6 Jul 2001 20:33:35 -0000 1.125
+++ src/modules/perl/Apache.xs 20 Feb 2003 05:11:36 -0000
@@ -655,8 +655,11 @@
Apache r

char *
-unescape_url(string)
-char *string
+unescape_url(sv)
+SV *sv
+
+ INIT:
+ char *string = SvPV_force(sv, PL_na);

CODE:
unescape_url(string);

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to