diff options
author | Araq <rumpf_a@web.de> | 2016-11-28 21:45:29 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-11-28 21:45:29 +0100 |
commit | 49667798eb2fcd6cee5754bf450bc9ccef2a8ed2 (patch) | |
tree | b469bbef0789a67f4f5ad65554f0142db68e95d4 /lib | |
parent | 27723af469a937835b9679c41364d9db0090036e (diff) | |
download | Nim-49667798eb2fcd6cee5754bf450bc9ccef2a8ed2.tar.gz |
further progress; more tests are green
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/gc.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim index 7fb4c7ac7..5e9be6246 100644 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -461,6 +461,7 @@ proc rawNewObj(typ: PNimType, size: int, gch: var GcHeap): pointer = gcAssert(typ.kind in {tyRef, tyString, tySequence}, "newObj: 1") collectCT(gch) var res = cast[PCell](rawAlloc(gch.region, size + sizeof(Cell))) + gcAssert typ.kind == tyString or size >= typ.base.size, "size too small" gcAssert((cast[ByteAddress](res) and (MemAlign-1)) == 0, "newObj: 2") # now it is buffered in the ZCT res.typ = typ |