[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/5] Disable the GC at exit if GC_remove_roots absent
From: |
Georgiy Tugai |
Subject: |
[PATCH 4/5] Disable the GC at exit if GC_remove_roots absent |
Date: |
Thu, 25 Mar 2021 20:14:18 +0000 |
I suspect that the lack of GC_remove_roots is causing the segmentation
fault during pk_compiler_free. This may or may not be indicative of
deeper issues.
2021-03-25 Georgiy Tugai <georgiy@crossings.link>
* poke/poke.c (finalize): GC_disable just before compiler cleanup
---
ChangeLog | 4 ++++
poke/poke.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 2a115b12..5b6c3abd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-03-25 Georgiy Tugai <georgiy@crossings.link>
+
+ * poke/poke.c (finalize): GC_disable just before compiler cleanup
+
2021-03-25 Georgiy Tugai <georgiy@crossings.link>
* .gitignore: exclude gl-libpoke/Makefile.am
diff --git a/poke/poke.c b/poke/poke.c
index 6343726d..0b009c38 100644
--- a/poke/poke.c
+++ b/poke/poke.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <locale.h>
#include <textstyle.h>
+#include <gc/gc.h>
#include "xalloc.h"
#include <assert.h>
@@ -295,6 +296,9 @@ finalize (void)
#endif
pk_cmd_shutdown ();
pk_map_shutdown ();
+#ifndef HAVE_GC_REMOVE_ROOTS
+ GC_disable ();
+#endif
pk_compiler_free (poke_compiler);
pk_term_shutdown ();
}
--
2.26.2
[PATCH 5/5] First version of REPL Ctrl-C trampoline for Woe32, Georgiy Tugai, 2021/03/25
Re: [PATCH 1/5] Rename CHAR, IN, VOID, ERROR to avoid collision, Jose E. Marchesi, 2021/03/26