added test case; threadex example crashes now
This commit is contained in:
parent
b26e6e3589
commit
79f4b37d3b
4 changed files with 32 additions and 2 deletions
|
|
@ -472,7 +472,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 in {tyString, tySequence} or size >= typ.base.size, "size too small"
|
||||
#gcAssert typ.kind in {tyString, tySequence} 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue