summary refs log tree commit diff stats
path: root/lib/system/gc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/gc.nim')
-rw-r--r--lib/system/gc.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim
index dac06119d..a0c943c35 100644
--- a/lib/system/gc.nim
+++ b/lib/system/gc.nim
@@ -639,6 +639,7 @@ when useMarkForDebug or useBackupGc:
     while gch.tempStack.len > 0:
       dec gch.tempStack.len
       var d = gch.tempStack.d[gch.tempStack.len]
+      gcAssert isAllocatedPtr(gch.region, d), "markS: foreign heap root detected!"
       if not containsOrIncl(gch.marked, d):
         forAllChildren(d, waMarkPrecise)