From 57cef70d62296fb45ae02c6779992f79e0f2199e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Tue, 28 Dec 1999 03:22:22 +0100 Subject: [PATCH] Added some extra paranoia to cpp(). Rev: src/cpp.c:1.58 --- src/cpp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/cpp.c b/src/cpp.c index d8dd5586e3..2cfbc43fb5 100644 --- a/src/cpp.c +++ b/src/cpp.c @@ -5,7 +5,7 @@ \*/ /* - * $Id: cpp.c,v 1.57 1999/12/08 16:23:35 grubba Exp $ + * $Id: cpp.c,v 1.58 1999/12/28 02:22:22 grubba Exp $ */ #include "global.h" #include "language.h" @@ -1070,6 +1070,9 @@ void f_cpp(INT32 args) struct cpp this; int auto_convert = 0; struct pike_string *charset = NULL; +#ifdef PIKE_DEBUG + ONERROR tmp; +#endif /* PIKE_DEBUG */ if(args<1) error("Too few arguments to cpp()\n"); @@ -1186,8 +1189,17 @@ void f_cpp(INT32 args) this.current_file->size_shift, &this.buf); string_builder_putchar(&this.buf, '\n'); +#ifdef PIKE_DEBUG + SET_ONERROR(tmp, fatal_on_error, "Preprocessor exited with longjump!\n"); +#endif /* PIKE_DEBUG */ + low_cpp(&this, data->str, data->len, data->size_shift, 0, auto_convert, charset); + +#ifdef PIKE_DEBUG + UNSET_ONERROR(tmp); +#endif /* PIKE_DEBUG */ + if(this.defines) free_hashtable(this.defines, free_one_define); -- GitLab