Some more details:

It appears that SvIV() call at src/speedy_perl.c:821 is sometimes called
on an undef value. SvIV() then tries to trigger a "use of uninitialized
value" warning, which then bombs out when it can't find the location of
the call in Perl source.

I have "#!/usr/bin/speedy -Tw" in my CGI script.

According to folks at #perl, SvIV() should always be safe to call, even
outside the interpreter. However, the attached patch appears to fix the
problem for me (and is probably also a more correct way of doing that if
statement anyway).

Somebody with deeper knowledge of Perl guts will have to tell if it just
fixes the symptoms or the cause of the bug.

Thanks
Tomaž
--- speedy-cgi-perl-2.22/src/speedy_perl.c.orig	2009-07-23 21:26:43.000000000 +0200
+++ speedy-cgi-perl-2.22/src/speedy_perl.c	2009-07-23 21:26:47.000000000 +0200
@@ -818,7 +818,7 @@
     my_call_sv(get_perlvar(&PERLVAR_RESET_GLOBALS));
 
     /* Copy option values in from the perl vars */
-    if (SvIV(PERLVAL_OPTS_CHANGED)) {
+    if (SvTRUE(PERLVAL_OPTS_CHANGED)) {
 	int i;
 	for (i = 0; i < SPEEDY_NUMOPTS; ++i) {
 	    OptRec *o = speedy_optdefs + i;

Reply via email to