mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-06 04:57:49 +00:00
gc.nim: Add a gcAssert to enforce the no heap sharing restrictions
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user