Loading ...
Sorry, an error occurred while loading the content.
 

Apache crash when using next outside loop

Expand Messages
  • Bjoern Hoehrmann
    Hi, http://dev.w3.org/cvsweb/validator/httpd/cgi-bin/check v1.437, there is a callback with return; # Don t report this as a normal error. at the end of the
    Message 1 of 1 , Aug 16, 2005
      Hi,

      http://dev.w3.org/cvsweb/validator/httpd/cgi-bin/check v1.437, there
      is a callback with 'return; # Don't report this as a normal error.' at
      the end of the script. If the return is changed into a "next" it will
      crash Apache when running under mod_perl 2.0.1 / Apache/2.0.54 on w2k3
      though I could not come up with a smaller test case for this yet. The
      callback is called from XS code (see http://spo.sf.net/), basically

      dSP;
      ENTER;
      SAVETMPS;
      PUSHMARK(SP);
      XPUSHs(m_handler);
      XPUSHs(hv ? sv_2mortal(newRV_noinc((SV*)hv)) : &PL_sv_undef);
      PUTBACK;
      call_method(name, G_DISCARD | G_SCALAR | G_EVAL);
      SPAGAIN;
      if (SvTRUE(ERRSV))
      {
      m_egp->halt();
      POPs;
      }
      PUTBACK;
      FREETMPS;
      LEAVE;

      Is this crash something I should worry about (as the author of most
      code involved)? Perhaps there is some subtle bug in the code above,
      but it's also possible that this is a bug in other code, maybe some-
      one wants to investigate this further... I would also have expected
      that Perl reports `Can't "next" outside a loop block` some time when
      processing this code but I did not see anything like that...

      regards,
      --
      Björn Höhrmann · mailto:bjoern@... · http://bjoern.hoehrmann.de
      Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
      68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
    Your message has been successfully submitted and would be delivered to recipients shortly.