From 46173612585e09fbad842963aaf61ac9f86317e5 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Fri, 19 Sep 2014 12:14:28 +0200 Subject: [PATCH] Issue 4116: Disable ASSERT_LIVE_IS_ALLOWED in GUILEv2 Apparently the garbage collection in GUILEv2 can do a mark pass over material without actually protecting it from collection, possibly because the garbage collector can run in a separate thread. At least, the attempt to print such remaining live smobs still seen by a mark pass leads to crashes, so disable this memory leak detection mechanism on GUILEv2. --- lily/include/smobs.hh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lily/include/smobs.hh b/lily/include/smobs.hh index 373bf77c6f..c3a9f4bf4c 100644 --- a/lily/include/smobs.hh +++ b/lily/include/smobs.hh @@ -293,7 +293,12 @@ public: static SCM readout (); }; -#ifndef NDEBUG +// This does not appear to work with GUILEv2's garbage collector: +// Objects are found in the GC phase but printing them will crash at +// least some, so they are apparently not protected in spite of being +// included in the GC scans. So it would appear that scanning smobs +// is not equivalent to marking them. Ugh. +#if !defined(NDEBUG) && !GUILEV2 #define ASSERT_LIVE_IS_ALLOWED(arg) \ do { \ static parsed_dead pass_here; \ -- 2.39.5