]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4116: Disable ASSERT_LIVE_IS_ALLOWED in GUILEv2
authorDavid Kastrup <dak@gnu.org>
Fri, 19 Sep 2014 10:14:28 +0000 (12:14 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 23 Sep 2014 16:48:43 +0000 (18:48 +0200)
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

index 373bf77c6f0ca2ba1d0e5e7a9619029bb4e8cb56..c3a9f4bf4c9d4e1d0870791b0bca8a9a7b3fe450 100644 (file)
@@ -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;                                       \