on latest devel , linux
compile with : nim c --gc:arc -r test350
#test350.nim
import times
echo now().utc
output
/home/lxuser/.choosenim/toolchains/nim-#devel/lib/pure/times.nim(1090) test350
/home/lxuser/.choosenim/toolchains/nim-#devel/lib/system/refs_v2.nim(162) nimRawDispose
/home/lxuser/.choosenim/toolchains/nim-#devel/lib/system/alloc.nim(972) dealloc
/home/lxuser/.choosenim/toolchains/nim-#devel/lib/system/alloc.nim(871) rawDealloc
/home/lxuser/.choosenim/toolchains/nim-#devel/lib/system/avltree.nim(74) del
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
compile with : nim c --gc:orc -r test350
output
2020-07-11T21:26:38Z
Unfortunately I have no time to test this pull request,but I can give one more example which may help to pinpoint the issue:
# test350.nim
import os,times
echo now().utc
let filename = extractFileName(getAppFilename())
let fi = getFileInfo(filename)
echo("Last Access : " ,fi.lastAccessTime)
echo("Last Write : " ,fi.lastWriteTime)
echo("Creation : " ,fi.creationTime)
compile with nim c --gc:arc -f -r test350
output
2020-07-12T06:46:12Z
Last Access : 2020-07-12T07:46:11+01:00
Last Write : 2020-07-12T07:46:11+01:00
Creation : 2020-07-12T07:46:11+01:00
Traceback (most recent call last)
/home/lxuser/.choosenim/toolchains/nim-#devel/lib/pure/times.nim(1090) test350
/home/lxuser/.choosenim/toolchains/nim-#devel/lib/system/refs_v2.nim(196) nimDecRefIsLast
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
compile with nim c --gc:orc -f -r test350
output
2020-07-12T06:48:04Z
Last Access : 2020-07-12T07:48:04+01:00
Last Write : 2020-07-12T07:48:04+01:00
Creation : 2020-07-12T07:48:04+01:00
Traceback (most recent call last)
/home/lxuser/.choosenim/toolchains/nim-#devel/lib/pure/times.nim(1090) test350
/home/lxuser/.choosenim/toolchains/nim-#devel/lib/system/cyclicrefs_bacon.nim(346) nimDecRefIsLastCyclicDyn
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
work around :
compile with : nim c -d:danger -f -r test350