From 09f7be13b67f6ea910c81a344a553615117efd63 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 1 Aug 2023 21:18:08 +0800 Subject: [PATCH] fixes #22262; fixes `-d:useMalloc` broken with `--mm:none` and `--threads on` (#22355) * fixes #22262; -d:useMalloc broken with --mm:none and threads on * fixes (cherry picked from commit a23e53b4902d227353886d97ef50609709519dd9) --- lib/system/mm/malloc.nim | 2 +- tests/system/tgcnone.nim | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/system/mm/malloc.nim b/lib/system/mm/malloc.nim index b24b6f1e0c..47f1a95ae4 100644 --- a/lib/system/mm/malloc.nim +++ b/lib/system/mm/malloc.nim @@ -88,7 +88,7 @@ type proc alloc(r: var MemRegion, size: int): pointer = result = alloc(size) -proc alloc0Impl(r: var MemRegion, size: int): pointer = +proc alloc0(r: var MemRegion, size: int): pointer = result = alloc0Impl(size) proc dealloc(r: var MemRegion, p: pointer) = dealloc(p) proc deallocOsPages(r: var MemRegion) = discard diff --git a/tests/system/tgcnone.nim b/tests/system/tgcnone.nim index 700176d5f8..83259c995f 100644 --- a/tests/system/tgcnone.nim +++ b/tests/system/tgcnone.nim @@ -2,5 +2,6 @@ discard """ matrix: "--gc:none -d:useMalloc" """ # bug #15617 +# bug #22262 let x = 4 doAssert x == 4