Skip to content

Commit

Permalink
use sysAssert
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Nov 14, 2022
1 parent 408e9cf commit 5a2adb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/system/alloc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ proc rawDealloc(a: var MemRegion, p: pointer) =
#sysAssert(isAllocatedPtr(a, p), "rawDealloc: no allocated pointer")
sysAssert(allocInv(a), "rawDealloc: begin")
var c = pageAddr(p)
sysAssert(c != nil, "rawDealloc: begin")
if isSmallChunk(c):
# `p` is within a small chunk:
var c = cast[PSmallChunk](c)
Expand Down
1 change: 1 addition & 0 deletions tests/destructor/topttree.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
discard """
matrix: "-d:useGcAssert -d:useSysAssert"
output: '''10.0
60.0
90.0
Expand Down

0 comments on commit 5a2adb8

Please sign in to comment.