From ad6ff59b9222ec02479f6b1549c0805a66e49569 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Wed, 13 Aug 2008 20:02:03 +0200 Subject: [PATCH] Probably a better fix for the multiple run_cleanup calls bug. Rev: src/pike_compiler.h:1.16 Rev: src/program.c:1.741 --- src/pike_compiler.h | 3 +-- src/program.c | 20 +++----------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/pike_compiler.h b/src/pike_compiler.h index 61f881bd19..e2541e1732 100644 --- a/src/pike_compiler.h +++ b/src/pike_compiler.h @@ -2,7 +2,7 @@ || 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: pike_compiler.h,v 1.15 2008/08/13 14:27:36 mast Exp $ +|| $Id: pike_compiler.h,v 1.16 2008/08/13 18:02:03 mast Exp $ */ #ifndef PIKE_COMPILER_H @@ -55,7 +55,6 @@ struct compilation /* Flags. */ #define COMPILER_BUSY 1 /* The compiler is busy compiling. */ #define COMPILER_DONE 2 /* The compiler is finished compiling. */ -#define COMPILER_CLEANUP 4 /* run_cleanup has cleaned up the program. */ /* CompilerEnvironment function numbers. */ #define CE_REPORT_FUN_NUM 0 diff --git a/src/program.c b/src/program.c index 13ff6253f0..7234bcf494 100644 --- a/src/program.c +++ b/src/program.c @@ -2,7 +2,7 @@ || 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: program.c,v 1.740 2008/08/13 14:45:08 mast Exp $ +|| $Id: program.c,v 1.741 2008/08/13 18:02:02 mast Exp $ */ #include "global.h" @@ -7970,20 +7970,6 @@ static void run_cleanup(struct compilation *c, int delayed) } #endif /* PIKE_DEBUG */ - /* We can get called several times when a compilation registered as - * delayed has failed and is cleaned up right away regardless (see - * the lines with the run_pass1() calls in f_compilation_compile and - * compile). It's not at all certain that this is the correct way to - * deal with it, though.. /mast */ - if (c->flags & COMPILER_CLEANUP) { - CDFPRINTF((stderr, - "th(%ld) %p run_cleanup() - already cleaned up.\n", - (long)th_self(), c->target)); - return; - } - - c->flags |= COMPILER_CLEANUP; - exit_threads_disable(NULL); CDFPRINTF((stderr, @@ -8389,7 +8375,7 @@ static void f_compilation_compile(INT32 args) (supporter_callback *) call_delayed_pass2, (void *)c); - delay=run_pass1(c) && c->p; + delay=run_pass1(c); dependants_ok = call_dependants(& c->supporter, !!c->p ); #ifdef PIKE_DEBUG /* FIXME */ @@ -9319,7 +9305,7 @@ struct program *compile(struct pike_string *aprog, (supporter_callback *) call_delayed_pass2, (void *)c); - delay=run_pass1(c) && c->p; + delay=run_pass1(c); dependants_ok = call_dependants(& c->supporter, !!c->p ); #ifdef PIKE_DEBUG /* FIXME */ -- GitLab