From 5b7b063f2a8f4cc725693f9c962d2ba49a93ba18 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Thu, 8 Apr 1999 16:54:29 -0700
Subject: [PATCH] coredump fix (I hope)

Rev: src/constants.c:1.16
Rev: src/interpret.c:1.119
Rev: src/main.c:1.69
---
 src/constants.c |  5 +++--
 src/interpret.c |  4 +++-
 src/main.c      | 10 +++++++---
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/constants.c b/src/constants.c
index 090cb93f22..818180f2e9 100644
--- a/src/constants.c
+++ b/src/constants.c
@@ -15,7 +15,7 @@
 #include "error.h"
 #include "block_alloc.h"
 
-RCSID("$Id: constants.c,v 1.15 1999/03/02 03:13:13 hubbe Exp $");
+RCSID("$Id: constants.c,v 1.16 1999/04/08 23:54:26 hubbe Exp $");
 
 static INT32 num_callable=0;
 static struct mapping *builtin_constants = 0;
@@ -153,12 +153,13 @@ void quick_add_efun(char *name, int name_length,
 
 void cleanup_added_efuns(void)
 {
+#ifdef DO_PIKE_CLEANUP
   if(builtin_constants)
   {
     free_mapping(builtin_constants);
     builtin_constants=0;
   }
-  free_all_callable_blocks();
+#endif
 }
 void count_memory_in_callables(INT32 *num_, INT32 *size_)
 {
diff --git a/src/interpret.c b/src/interpret.c
index 78f982624e..99f785f640 100644
--- a/src/interpret.c
+++ b/src/interpret.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: interpret.c,v 1.118 1999/03/19 11:43:14 hubbe Exp $");
+RCSID("$Id: interpret.c,v 1.119 1999/04/08 23:54:28 hubbe Exp $");
 #include "interpret.h"
 #include "object.h"
 #include "program.h"
@@ -1351,5 +1351,7 @@ void cleanup_interpret(void)
 
 void really_clean_up_interpret(void)
 {
+#ifdef DO_PIKE_CLEANUP
   free_all_pike_frame_blocks();
+#endif
 }
diff --git a/src/main.c b/src/main.c
index dd7257fbc7..e671588249 100644
--- a/src/main.c
+++ b/src/main.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: main.c,v 1.68 1999/04/08 22:27:07 hubbe Exp $");
+RCSID("$Id: main.c,v 1.69 1999/04/08 23:54:29 hubbe Exp $");
 #include "fdlib.h"
 #include "backend.h"
 #include "module.h"
@@ -540,7 +540,6 @@ void low_exit_main(void)
   free_svalue(& throw_value);
   throw_value.type=T_INT;
 
-  exit_destroy_called_mark_hash();
 #if defined(PIKE_DEBUG) && defined(DEBUG_MALLOC)
   if(verbose_debug_exit)
   {
@@ -610,7 +609,12 @@ void low_exit_main(void)
 
   cleanup_shared_string_table();
 #endif
-  cleanup_callbacks();
+
   really_clean_up_interpret();
+#ifdef DO_PIKE_CLEANUP
+  cleanup_callbacks();
+  free_all_callable_blocks();
+  exit_destroy_called_mark_hash();
+#endif
 }
 
-- 
GitLab