mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
fixes a long standing channels bug
This commit is contained in:
@@ -143,7 +143,7 @@ proc storeAux(dest, src: Pointer, mt: PNimType, t: PRawChannel,
|
||||
# XXX we should use the dynamic type here too, but that is not stored
|
||||
# in the inbox at all --> use source[]'s object type? but how? we need
|
||||
# a tyRef to the object!
|
||||
var obj = newObj(mt.base, mt.base.size)
|
||||
var obj = newObj(mt, mt.base.size)
|
||||
unsureAsgnRef(x, obj)
|
||||
storeAux(x[], s, mt.base, t, mode)
|
||||
if mode != mStore: Dealloc(t.region, s)
|
||||
|
||||
@@ -90,6 +90,8 @@ template gcAssert(cond: bool, msg: string) =
|
||||
when defined(useGcAssert):
|
||||
if not cond:
|
||||
echo "[GCASSERT] ", msg
|
||||
GC_disable()
|
||||
writeStackTrace()
|
||||
quit 1
|
||||
|
||||
proc addZCT(s: var TCellSeq, c: PCell) {.noinline.} =
|
||||
|
||||
Reference in New Issue
Block a user