From b69f4f723317d98abbbb25da3faf1ace4fb4de72 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Tue, 2 Oct 2018 18:59:33 -0400 Subject: [PATCH] Prevent segfault on ARM --- CHANGELOG.md | 6 ++++++ gc.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da71ae23..27125a8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## TBD - TBD + +Bug Fixes + +- Prevent GC segmentation fault on ARM platforms (Raspberry Pi 2). + ## 0.9.3 - October 1, 2018 Features diff --git a/gc.c b/gc.c index d2b04818..f1c55afc 100644 --- a/gc.c +++ b/gc.c @@ -1985,8 +1985,10 @@ fprintf(stdout, "done tracing, cooperator is clearing full bits\n"); unswept++; } } - h_head->num_unswept_children = unswept; - //printf("set num_unswept_children = %d computed = %d\n", h_head->num_unswept_children, gc_num_unswept_heaps(h_head)); + if (h_head) { + h_head->num_unswept_children = unswept; + //printf("set num_unswept_children = %d computed = %d\n", h_head->num_unswept_children, gc_num_unswept_heaps(h_head)); + } } // At least for now, let the main thread help clean up any terminated threads