Branch: Tag:

2010-09-27

2010-09-27 17:06:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Unlink ONERROR's before calling them to avoid recursion on error.

Fixes LysLysKOM 18719549/Pike mailinglist 12047.
Thanks to Artur Skawina <art.08.09@gmail.com> for the report.

Rev: src/error.c:1.170
Rev: src/pike_error.h:1.56
Rev: src/testsuite.in:1.899

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: error.c,v 1.169 2010/02/21 22:42:19 srb Exp $ + || $Id: error.c,v 1.170 2010/09/27 17:06:17 grubba Exp $   */      #define NO_PIKE_SHORTHAND
135:    {    while(Pike_interpreter.recoveries->onerror)    { -  while(Pike_fp != Pike_interpreter.recoveries->onerror->frame_pointer) +  ONERROR *err = Pike_interpreter.recoveries->onerror; +  while(Pike_fp != err->frame_pointer)    {   #ifdef PIKE_DEBUG    if(!Pike_fp)
144:    POP_PIKE_FRAME();    }    -  (*Pike_interpreter.recoveries->onerror->func)(Pike_interpreter.recoveries->onerror->arg); -  Pike_interpreter.recoveries->onerror=Pike_interpreter.recoveries->onerror->previous; +  Pike_interpreter.recoveries->onerror = err->previous; +  (*err->func)(err->arg);    }       {
170:       while(Pike_interpreter.recoveries->onerror)    { -  while(Pike_fp != Pike_interpreter.recoveries->onerror->frame_pointer) +  ONERROR *err = Pike_interpreter.recoveries->onerror; +  +  while(Pike_fp != err->frame_pointer)    {   #ifdef PIKE_DEBUG    if(!Pike_fp)
178:   #endif    POP_PIKE_FRAME();    } -  (*Pike_interpreter.recoveries->onerror->func)(Pike_interpreter.recoveries->onerror->arg); -  Pike_interpreter.recoveries->onerror=Pike_interpreter.recoveries->onerror->previous; +  Pike_interpreter.recoveries->onerror = err->previous; +  (*err->func)(err->arg);    }       while(Pike_fp != Pike_interpreter.recoveries->frame_pointer)