nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.6k stars 1.47k forks source link

Nim-1.6 segfault #19569

Closed stefantalpalaru closed 2 years ago

stefantalpalaru commented 2 years ago

Compiler segfault in both "version-1-6" and "devel" HEAD, triggered by this nimbus-eth2 PR: https://github.com/status-im/nimbus-eth2/pull/3394

GDB backtrace from latest Nim "devel", using PATH="/src/77_DLD/CODE/status/Nim/bin:${PATH}" USE_SYSTEM_NIM=1 ./env.sh gdb --args nim c --compileOnly -o:build/nimbus_beacon_node -d:disableLTO --hints:off --warnings:off --verbosity:0 -d:chronicles_log_level=DEBUG -d:release --parallelBuild:1 -d:libp2p_agents_metrics -d:KnownLibP2PAgents=nimbus,lighthouse,prysm,teku -d:nimCachePathOverride=nimcache/release/nimbus_beacon_node beacon_chain/nimbus_beacon_node.nim:

Program received signal SIGSEGV, Segmentation fault.
allPathsAsgnResult__cgen_26861 (n=0x0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:930
930   case n.kind
(gdb) bt
#0  allPathsAsgnResult__cgen_26861 (n=0x0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:930
#1  0x0000555555bad62c in allPathsAsgnResult__cgen_26861 (n=0x7fffa07b41a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:921
#2  0x0000555555bad62c in allPathsAsgnResult__cgen_26861 (n=0x7fffa07b46b0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:921
#3  0x0000555555bad62c in allPathsAsgnResult__cgen_26861 (n=0x7fffa07b4140) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:921
#4  0x0000555555bad62c in allPathsAsgnResult__cgen_26861 (n=0x7fff620d2680) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:921
#5  0x0000555555bad62c in allPathsAsgnResult__cgen_26861 (n=0x7fff620d25c0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:921
#6  0x0000555555bad62c in allPathsAsgnResult__cgen_26861 (n=0x7fff620b8b00) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:921
#7  0x0000555555bad62c in allPathsAsgnResult__cgen_26861 (n=0x7fff620b8860) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:921
#8  0x0000555555bad62c in allPathsAsgnResult__cgen_26861 (n=0x7fff620b8a10) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:921
#9  0x0000555555baba51 in allPathsAsgnResult__cgen_26861 (n=0x7fff620b8ad0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:933
#10 0x0000555555baba51 in allPathsAsgnResult__cgen_26861 (n=n@entry=0x7fff620b8bc0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:933
#11 0x0000555555c1c929 in genProcAux__cgen_27082 (m=m@entry=0x7fffbbf3a630, prc=prc@entry=0x7fffa07b2650) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1065
#12 0x0000555555bce17d in genProcNoForward__cgen_27450 (m=m@entry=0x7fffbbf3a050, prc=prc@entry=0x7fffa07b2650) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1213
#13 0x0000555555bce39d in genProc__cgen_422 (m=0x7fffbbf3a050, prc=prc@entry=0x7fffa07b2650) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1239
#14 0x0000555555bc3689 in expr__cgen_11613 (p=p@entry=0x7fff61f9a730, n=n@entry=0x7fff948f28f0, d=d@entry=0x7fffffff3690) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2760
#15 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7fff61f9a730, e=0x7fff948f28f0, result=result@entry=0x7fffffff3690) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#16 0x0000555555c2efd8 in genPrefixCall__cgen_12487 (p=p@entry=0x7fff61f9a730, le=le@entry=0x0, ri=ri@entry=0x7fff62025530, d=d@entry=0x7fffffff3e20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:402
#17 0x0000555555c3257b in genAsgnCall__cgen_13242 (p=p@entry=0x7fff61f9a730, le=le@entry=0x0, ri=ri@entry=0x7fff62025530, d=d@entry=0x7fffffff3e20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:803
#18 0x0000555555c32833 in genCall__cgen_13272 (p=p@entry=0x7fff61f9a730, e=e@entry=0x7fff62025530, d=d@entry=0x7fffffff3e20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:805
#19 0x0000555555bc4726 in expr__cgen_11613 (p=p@entry=0x7fff61f9a730, n=0x7fff62025530, d=d@entry=0x7fffffff3e20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2840
#20 0x0000555555c895c1 in genIf__cgen_14313 (p=p@entry=0x7fff61f9a730, n=n@entry=0x7fff62025b60, d=d@entry=0x7fffffff3e20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:465
#21 0x0000555555bc4e14 in expr__cgen_11613 (p=p@entry=0x7fff61f9a730, n=0x7fff62025b60, d=d@entry=0x7fffffff3e20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2871
#22 0x0000555555c87219 in genStmtListExpr__cgen_24993 (p=p@entry=0x7fff61f9a730, n=n@entry=0x7fff6201d8c0, d=d@entry=0x7fffffff3e20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2595
#23 0x0000555555bc4ddf in expr__cgen_11613 (p=p@entry=0x7fff61f9a730, n=n@entry=0x7fff6201d8c0, d=d@entry=0x7fffffff3e20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2869
#24 0x0000555555c765b2 in loadInto__cgen_13639 (p=p@entry=0x7fff61f9a730, le=le@entry=0x7fff948f2a40, ri=ri@entry=0x7fff6201d8c0, a=a@entry=0x7fffffff3e20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:146
#25 0x0000555555c963c3 in genAsgn__cgen_17896 (p=p@entry=0x7fff61f9a730, e=e@entry=0x7fff620bcec0, fastAsgn=fastAsgn@entry=false) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1595
#26 0x0000555555bc54d0 in expr__cgen_11613 (p=p@entry=0x7fff61f9a730, n=n@entry=0x7fff620bcec0, d=d@entry=0x7fffffff4010) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2902
#27 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f9a730, t=t@entry=0x7fff620bcec0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#28 0x0000555555bd307f in genProcBody__cgen_27014 (p=p@entry=0x7fff61f9a730, procBody=procBody@entry=0x7fff620bcec0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1018
#29 0x0000555555c1c9ee in genProcAux__cgen_27082 (m=m@entry=0x7fffbbf3a050, prc=prc@entry=0x7fffc2d9b350) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1077
#30 0x0000555555bce17d in genProcNoForward__cgen_27450 (m=m@entry=0x7fffbbf3a050, prc=prc@entry=0x7fffc2d9b350) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1213
#31 0x0000555555bce39d in genProc__cgen_422 (m=0x7fffbbf3a050, prc=prc@entry=0x7fffc2d9b350) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1239
#32 0x0000555555bc3689 in expr__cgen_11613 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fffac2d85c0, d=d@entry=0x7fffffff4530) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2760
#33 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7fff61f763c0, e=0x7fffac2d85c0, result=result@entry=0x7fffffff4530) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#34 0x0000555555c2efd8 in genPrefixCall__cgen_12487 (p=p@entry=0x7fff61f763c0, le=le@entry=0x0, ri=ri@entry=0x7fff6208ba10, d=d@entry=0x7fffffff4840) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:402
#35 0x0000555555c3257b in genAsgnCall__cgen_13242 (p=p@entry=0x7fff61f763c0, le=le@entry=0x0, ri=ri@entry=0x7fff6208ba10, d=d@entry=0x7fffffff4840) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:803
#36 0x0000555555c32833 in genCall__cgen_13272 (p=p@entry=0x7fff61f763c0, e=e@entry=0x7fff6208ba10, d=d@entry=0x7fffffff4840) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:805
#37 0x0000555555bc4726 in expr__cgen_11613 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fff6208ba10, d=d@entry=0x7fffffff4840) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2840
#38 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7fff61f763c0, e=e@entry=0x7fff6208ba10, result=result@entry=0x7fffffff4840) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#39 0x0000555555c2b346 in genArg__cgen_12208 (p=p@entry=0x7fff61f763c0, n=0x7fff6208ba10, param=0x7fffa770c950, call=call@entry=0x7fff6208b9e0, needsTmp=<optimized out>) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:279
#40 0x0000555555c2c62c in genParams__cgen_12356 (p=p@entry=0x7fff61f763c0, ri=ri@entry=0x7fff6208b9e0, typ=typ@entry=0x7fff97373e60) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:389
#41 0x0000555555c2f230 in genPrefixCall__cgen_12487 (p=p@entry=0x7fff61f763c0, le=le@entry=0x7fffac2d8620, ri=ri@entry=0x7fff6208b9e0, d=d@entry=0x7fffa770cc10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:408
#42 0x0000555555c3257b in genAsgnCall__cgen_13242 (p=p@entry=0x7fff61f763c0, le=le@entry=0x7fffac2d8620, ri=ri@entry=0x7fff6208b9e0, d=d@entry=0x7fffa770cc10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:803
#43 0x0000555555c76696 in loadInto__cgen_13639 (p=p@entry=0x7fff61f763c0, le=le@entry=0x7fffac2d8620, ri=ri@entry=0x7fff6208b9e0, a=a@entry=0x7fffa770cc10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:136
#44 0x0000555555c78c3f in genSingleVar__cgen_14048 (p=p@entry=0x7fff61f763c0, v=v@entry=0x7fffa770cb90, vn=0x7fffac2d8620, value=0x7fff6208b9e0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:386
#45 0x0000555555c78ef6 in genSingleVar__cgen_14257 (p=p@entry=0x7fff61f763c0, a=0x7fff6208b9b0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:399
#46 0x0000555555c7969f in genVarStmt__cgen_14293 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fff6208b950) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:417
#47 0x0000555555bc525d in expr__cgen_11613 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fff6208b950, d=d@entry=0x7fffffff4ed0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2890
#48 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f763c0, t=t@entry=0x7fff6208b950) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#49 0x0000555555c5ef89 in genStmtList__cgen_25047 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fff6208b890) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2588
#50 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fff6208b890, d=d@entry=0x7fffffff56a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#51 0x0000555555c8a39e in exprBlock__cgen_13728 (p=p@entry=0x7fff61f763c0, n=0x7fff6208b890, d=d@entry=0x7fffffff56a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:187
#52 0x0000555555c921da in genOrdinalCase__cgen_15636 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fff6208b560, d=d@entry=0x7fffffff56a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:934
#53 0x0000555555c9564e in genCase__cgen_15792 (p=p@entry=0x7fff61f763c0, t=t@entry=0x7fff6208b560, d=d@entry=0x7fffffff56a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:965
#54 0x0000555555bc52f3 in expr__cgen_11613 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fff6208b560, d=d@entry=0x7fffffff56a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2896
#55 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f763c0, t=t@entry=0x7fff6208b560) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#56 0x0000555555c5ef89 in genStmtList__cgen_25047 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fff62086440) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2588
#57 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff61f763c0, n=n@entry=0x7fff62086440, d=d@entry=0x7fffffff5950) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#58 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f763c0, t=t@entry=0x7fff62086440) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#59 0x0000555555bd307f in genProcBody__cgen_27014 (p=p@entry=0x7fff61f763c0, procBody=procBody@entry=0x7fff62086440) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1018
#60 0x0000555555c1c9ee in genProcAux__cgen_27082 (m=m@entry=0x7fffbbf3a050, prc=prc@entry=0x7fffb4665b90) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1077
#61 0x0000555555bce17d in genProcNoForward__cgen_27450 (m=m@entry=0x7fffbbf3a050, prc=prc@entry=0x7fffb4665b90) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1213
#62 0x0000555555bce39d in genProc__cgen_422 (m=0x7fffbbf3a050, prc=prc@entry=0x7fffb4665b90) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1239
#63 0x0000555555bc3689 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fffb1633860, d=d@entry=0x7fffffff5e70) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2760
#64 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7fff61f76ec0, e=0x7fffb1633860, result=result@entry=0x7fffffff5e70) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#65 0x0000555555c2efd8 in genPrefixCall__cgen_12487 (p=p@entry=0x7fff61f76ec0, le=le@entry=0x0, ri=ri@entry=0x7fff62015f50, d=d@entry=0x7fffffff6090) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:402
#66 0x0000555555c3257b in genAsgnCall__cgen_13242 (p=p@entry=0x7fff61f76ec0, le=le@entry=0x0, ri=ri@entry=0x7fff62015f50, d=d@entry=0x7fffffff6090) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:803
#67 0x0000555555c32833 in genCall__cgen_13272 (p=p@entry=0x7fff61f76ec0, e=e@entry=0x7fff62015f50, d=d@entry=0x7fffffff6090) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:805
#68 0x0000555555bc46b8 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff62015f50, d=d@entry=0x7fffffff6110) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2834
#69 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f76ec0, t=0x7fff62015f50) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#70 0x0000555555c5ecdb in genStmtList__cgen_25047 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff61c12140) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2599
#71 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff61c12140, d=d@entry=0x7fffffff63c0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#72 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f76ec0, t=t@entry=0x7fff61c12140) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#73 0x0000555555c5ef89 in genStmtList__cgen_25047 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff61b3a230) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2588
#74 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff61b3a230, d=d@entry=0x7fffffff6670) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#75 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f76ec0, t=t@entry=0x7fff61b3a230) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#76 0x0000555555c62c2b in genWhileStmt__cgen_14727 (p=p@entry=0x7fff61f76ec0, t=t@entry=0x7fff96e60110) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:619
#77 0x0000555555bc5244 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=0x7fff96e60110, d=d@entry=0x7fffffff6b10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2889
#78 0x0000555555c86a96 in genBlock__cgen_14810 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff610b25f0, d=d@entry=0x7fffffff6b10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:643
#79 0x0000555555bc4dc3 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff610b25f0, d=d@entry=0x7fffffff6b10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2868
#80 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f76ec0, t=0x7fff610b25f0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#81 0x0000555555c5ecdb in genStmtList__cgen_25047 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff620164a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2599
#82 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff620164a0, d=d@entry=0x7fffffff6dc0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#83 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f76ec0, t=0x7fff620164a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#84 0x0000555555c5ecdb in genStmtList__cgen_25047 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff62016470) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2599
#85 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff62016470, d=d@entry=0x7fffffff7070) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#86 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f76ec0, t=0x7fff62016470) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#87 0x0000555555c5ecdb in genStmtList__cgen_25047 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff62015f20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2599
#88 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=0x7fff62015f20, d=d@entry=0x7fffffff7510) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#89 0x0000555555c86a96 in genBlock__cgen_14810 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff62015e90, d=d@entry=0x7fffffff7510) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:643
#90 0x0000555555bc4dc3 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff62015e90, d=d@entry=0x7fffffff7510) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2868
#91 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f76ec0, t=t@entry=0x7fff62015e90) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#92 0x0000555555c874c7 in genStmtListExpr__cgen_24993 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff61d549e0, d=d@entry=0x7fffffff7830) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2588
#93 0x0000555555bc4ddf in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff61d549e0, d=d@entry=0x7fffffff7830) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2869
#94 0x0000555555c765b2 in loadInto__cgen_13639 (p=p@entry=0x7fff61f76ec0, le=le@entry=0x7fffa0de1c50, ri=ri@entry=0x7fff61d549e0, a=a@entry=0x7fffffff7830) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:146
#95 0x0000555555c963c3 in genAsgn__cgen_17896 (p=p@entry=0x7fff61f76ec0, e=e@entry=0x7fff61d54e30, fastAsgn=fastAsgn@entry=false) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1595
#96 0x0000555555bc54d0 in expr__cgen_11613 (p=p@entry=0x7fff61f76ec0, n=n@entry=0x7fff61d54e30, d=d@entry=0x7fffffff7a20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2902
#97 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff61f76ec0, t=t@entry=0x7fff61d54e30) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#98 0x0000555555bd307f in genProcBody__cgen_27014 (p=p@entry=0x7fff61f76ec0, procBody=procBody@entry=0x7fff61d54e30) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1018
#99 0x0000555555c1c9ee in genProcAux__cgen_27082 (m=m@entry=0x7fffbbf3a050, prc=prc@entry=0x7fffaa465ad0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1077
#100 0x0000555555bce17d in genProcNoForward__cgen_27450 (m=m@entry=0x7fffbbf3a050, prc=prc@entry=0x7fffaa465ad0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1213
#101 0x0000555555bce39d in genProc__cgen_422 (m=0x7fffbbf3a050, prc=prc@entry=0x7fffaa465ad0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1239
#102 0x0000555555bc3689 in expr__cgen_11613 (p=p@entry=0x7fff6122b100, n=n@entry=0x7fff8d51b620, d=d@entry=0x7fffffff7f40) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2760
#103 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7fff6122b100, e=0x7fff8d51b620, result=result@entry=0x7fffffff7f40) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#104 0x0000555555c2efd8 in genPrefixCall__cgen_12487 (p=p@entry=0x7fff6122b100, le=le@entry=0x0, ri=ri@entry=0x7fff61a2ba10, d=d@entry=0x7fffffff8260) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:402
#105 0x0000555555c3257b in genAsgnCall__cgen_13242 (p=p@entry=0x7fff6122b100, le=le@entry=0x0, ri=ri@entry=0x7fff61a2ba10, d=d@entry=0x7fffffff8260) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:803
#106 0x0000555555c32833 in genCall__cgen_13272 (p=p@entry=0x7fff6122b100, e=e@entry=0x7fff61a2ba10, d=d@entry=0x7fffffff8260) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:805
#107 0x0000555555bc4726 in expr__cgen_11613 (p=p@entry=0x7fff6122b100, n=n@entry=0x7fff61a2ba10, d=d@entry=0x7fffffff8260) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2840
#108 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7fff6122b100, e=0x7fff61a2ba10, result=result@entry=0x7fffffff8260) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#109 0x0000555555c07429 in unaryArith__cgen_19841 (p=p@entry=0x7fff6122b100, e=e@entry=0x7fff61a2b9b0, d=d@entry=0x7fffffff8620, op=op@entry=96) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:699
#110 0x0000555555c7d03b in genMagicExpr__cgen_24208 (p=p@entry=0x7fff6122b100, e=e@entry=0x7fff61a2b9b0, d=d@entry=0x7fffffff8620, op=<optimized out>) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2281
#111 0x0000555555bc4578 in expr__cgen_11613 (p=p@entry=0x7fff6122b100, n=n@entry=0x7fff61a2b9b0, d=d@entry=0x7fffffff8620) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2838
#112 0x0000555555bc66a1 in initLocExprSingleUse__cgen_11640 (p=p@entry=0x7fff6122b100, e=0x7fff61a2b9b0, result=result@entry=0x7fffffff8620) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:652
#113 0x0000555555c8841e in genIf__cgen_14313 (p=p@entry=0x7fff6122b100, n=n@entry=0x7fff61a2b8f0, d=d@entry=0x7fffffff8840) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:447
#114 0x0000555555bc4e14 in expr__cgen_11613 (p=p@entry=0x7fff6122b100, n=n@entry=0x7fff61a2b8f0, d=d@entry=0x7fffffff8840) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2871
#115 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff6122b100, t=t@entry=0x7fff61a2b8f0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#116 0x0000555555c874c7 in genStmtListExpr__cgen_24993 (p=p@entry=0x7fff6122b100, n=n@entry=0x7fff6094fc20, d=d@entry=0x7fffffff8b60) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2588
#117 0x0000555555bc4ddf in expr__cgen_11613 (p=p@entry=0x7fff6122b100, n=n@entry=0x7fff6094fc20, d=d@entry=0x7fffffff8b60) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2869
#118 0x0000555555c765b2 in loadInto__cgen_13639 (p=p@entry=0x7fff6122b100, le=le@entry=0x7fff8d6fe260, ri=ri@entry=0x7fff6094fc20, a=a@entry=0x7fffffff8b60) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:146
#119 0x0000555555c963c3 in genAsgn__cgen_17896 (p=p@entry=0x7fff6122b100, e=e@entry=0x7fff6088d8f0, fastAsgn=fastAsgn@entry=false) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1595
#120 0x0000555555bc54d0 in expr__cgen_11613 (p=p@entry=0x7fff6122b100, n=n@entry=0x7fff6088d8f0, d=d@entry=0x7fffffff8d50) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2902
#121 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff6122b100, t=t@entry=0x7fff6088d8f0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#122 0x0000555555bd307f in genProcBody__cgen_27014 (p=p@entry=0x7fff6122b100, procBody=procBody@entry=0x7fff6088d8f0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1018
#123 0x0000555555c1c9ee in genProcAux__cgen_27082 (m=m@entry=0x7fffbbf3a050, prc=prc@entry=0x7fff8d1f6f50) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1077
#124 0x0000555555bce17d in genProcNoForward__cgen_27450 (m=m@entry=0x7ffff48be050, prc=prc@entry=0x7fff8d1f6f50) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1213
#125 0x0000555555bce39d in genProc__cgen_422 (m=0x7ffff48be050, prc=prc@entry=0x7fff8d1f6f50) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1239
#126 0x0000555555bc3689 in expr__cgen_11613 (p=p@entry=0x7fff5fcebc00, n=n@entry=0x7fff8d747b00, d=d@entry=0x7fffffff9270) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2760
#127 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7fff5fcebc00, e=0x7fff8d747b00, result=result@entry=0x7fffffff9270) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#128 0x0000555555c2efd8 in genPrefixCall__cgen_12487 (p=p@entry=0x7fff5fcebc00, le=le@entry=0x7fff8e5646e0, ri=ri@entry=0x7fff5f2b4fb0, d=d@entry=0x7fffffff9420) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:402
#129 0x0000555555c3257b in genAsgnCall__cgen_13242 (p=p@entry=0x7fff5fcebc00, le=le@entry=0x7fff8e5646e0, ri=ri@entry=0x7fff5f2b4fb0, d=d@entry=0x7fffffff9420) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:803
#130 0x0000555555c76696 in loadInto__cgen_13639 (p=p@entry=0x7fff5fcebc00, le=0x7fff8e5646e0, ri=0x7fff5f2b4fb0, a=a@entry=0x7fffffff9420) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:136
#131 0x0000555555c791ff in genClosureVar__cgen_14280 (p=p@entry=0x7fff5fcebc00, a=0x7fff8e564680) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:407
#132 0x0000555555c7964b in genVarStmt__cgen_14293 (p=p@entry=0x7fff5fcebc00, n=n@entry=0x7fff5fe14230) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:419
#133 0x0000555555bc525d in expr__cgen_11613 (p=p@entry=0x7fff5fcebc00, n=n@entry=0x7fff5fe14230, d=d@entry=0x7fffffff9620) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2890
#134 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff5fcebc00, t=t@entry=0x7fff5fe14230) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#135 0x0000555555c874c7 in genStmtListExpr__cgen_24993 (p=p@entry=0x7fff5fcebc00, n=n@entry=0x7fff5fdeae30, d=d@entry=0x7fffffff9940) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2588
#136 0x0000555555bc4ddf in expr__cgen_11613 (p=p@entry=0x7fff5fcebc00, n=n@entry=0x7fff5fdeae30, d=d@entry=0x7fffffff9940) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2869
#137 0x0000555555c765b2 in loadInto__cgen_13639 (p=p@entry=0x7fff5fcebc00, le=le@entry=0x7fff8e5d2890, ri=ri@entry=0x7fff5fdeae30, a=a@entry=0x7fffffff9940) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:146
#138 0x0000555555c963c3 in genAsgn__cgen_17896 (p=p@entry=0x7fff5fcebc00, e=e@entry=0x7fff5fdeadd0, fastAsgn=fastAsgn@entry=false) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1595
#139 0x0000555555bc54d0 in expr__cgen_11613 (p=p@entry=0x7fff5fcebc00, n=n@entry=0x7fff5fdeadd0, d=d@entry=0x7fffffff9b30) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2902
#140 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff5fcebc00, t=0x7fff5fdeadd0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#141 0x0000555555c5ecdb in genStmtList__cgen_25047 (p=p@entry=0x7fff5fcebc00, n=n@entry=0x7fff5fdeac20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2599
#142 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff5fcebc00, n=n@entry=0x7fff5fdeac20, d=d@entry=0x7fffffff9de0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#143 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff5fcebc00, t=t@entry=0x7fff5fdeac20) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#144 0x0000555555bd307f in genProcBody__cgen_27014 (p=p@entry=0x7fff5fcebc00, procBody=procBody@entry=0x7fff5fdeac20) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1018
#145 0x0000555555c1c9ee in genProcAux__cgen_27082 (m=m@entry=0x7ffff48be050, prc=prc@entry=0x7fff8bd454d0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1077
#146 0x0000555555bce17d in genProcNoForward__cgen_27450 (m=m@entry=0x7ffff48be050, prc=prc@entry=0x7fff8bd454d0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1213
#147 0x0000555555bce39d in genProc__cgen_422 (m=0x7ffff48be050, prc=prc@entry=0x7fff8bd454d0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1239
#148 0x0000555555bc3689 in expr__cgen_11613 (p=p@entry=0x7fff5f1c9c00, n=n@entry=0x7fff8e61d470, d=d@entry=0x7fffffffa300) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2760
#149 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7fff5f1c9c00, e=0x7fff8e61d470, result=result@entry=0x7fffffffa300) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#150 0x0000555555c2efd8 in genPrefixCall__cgen_12487 (p=p@entry=0x7fff5f1c9c00, le=le@entry=0x7fff8e61d3b0, ri=ri@entry=0x7fff5d3697a0, d=d@entry=0x7fff8c1adc10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:402
#151 0x0000555555c3257b in genAsgnCall__cgen_13242 (p=p@entry=0x7fff5f1c9c00, le=le@entry=0x7fff8e61d3b0, ri=ri@entry=0x7fff5d3697a0, d=d@entry=0x7fff8c1adc10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:803
#152 0x0000555555c76696 in loadInto__cgen_13639 (p=p@entry=0x7fff5f1c9c00, le=le@entry=0x7fff8e61d3b0, ri=ri@entry=0x7fff5d3697a0, a=a@entry=0x7fff8c1adc10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:136
#153 0x0000555555c78c3f in genSingleVar__cgen_14048 (p=p@entry=0x7fff5f1c9c00, v=v@entry=0x7fff8c1adb90, vn=0x7fff8e61d3b0, value=0x7fff5d3697a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:386
#154 0x0000555555c78ef6 in genSingleVar__cgen_14257 (p=p@entry=0x7fff5f1c9c00, a=0x7fff5d369e90) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:399
#155 0x0000555555c7969f in genVarStmt__cgen_14293 (p=p@entry=0x7fff5f1c9c00, n=n@entry=0x7fff5d3693e0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:417
#156 0x0000555555bc525d in expr__cgen_11613 (p=p@entry=0x7fff5f1c9c00, n=n@entry=0x7fff5d3693e0, d=d@entry=0x7fffffffa7d0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2890
#157 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff5f1c9c00, t=t@entry=0x7fff5d3693e0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#158 0x0000555555c5ef89 in genStmtList__cgen_25047 (p=p@entry=0x7fff5f1c9c00, n=n@entry=0x7fff5cfab110) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2588
#159 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff5f1c9c00, n=n@entry=0x7fff5cfab110, d=d@entry=0x7fffffffaa80) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#160 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff5f1c9c00, t=t@entry=0x7fff5cfab110) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#161 0x0000555555bd307f in genProcBody__cgen_27014 (p=p@entry=0x7fff5f1c9c00, procBody=procBody@entry=0x7fff5cfab110) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1018
#162 0x0000555555c1c9ee in genProcAux__cgen_27082 (m=m@entry=0x7ffff48be050, prc=prc@entry=0x7fff8abeeb90) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1077
#163 0x0000555555bce17d in genProcNoForward__cgen_27450 (m=m@entry=0x7ffff48be050, prc=prc@entry=0x7fff8abeeb90) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1213
#164 0x0000555555bce39d in genProc__cgen_422 (m=0x7ffff48be050, prc=prc@entry=0x7fff8abeeb90) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1239
#165 0x0000555555bc3689 in expr__cgen_11613 (p=p@entry=0x7fff8eb52cb0, n=n@entry=0x7fff8f95ee30, d=d@entry=0x7fffffffafa0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2760
#166 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7fff8eb52cb0, e=0x7fff8f95ee30, result=result@entry=0x7fffffffafa0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#167 0x0000555555c2efd8 in genPrefixCall__cgen_12487 (p=p@entry=0x7fff8eb52cb0, le=le@entry=0x0, ri=ri@entry=0x7fff8f9727d0, d=d@entry=0x7fffffffb1c0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:402
#168 0x0000555555c3257b in genAsgnCall__cgen_13242 (p=p@entry=0x7fff8eb52cb0, le=le@entry=0x0, ri=ri@entry=0x7fff8f9727d0, d=d@entry=0x7fffffffb1c0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:803
#169 0x0000555555c32833 in genCall__cgen_13272 (p=p@entry=0x7fff8eb52cb0, e=e@entry=0x7fff8f9727d0, d=d@entry=0x7fffffffb1c0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:805
#170 0x0000555555bc46b8 in expr__cgen_11613 (p=p@entry=0x7fff8eb52cb0, n=n@entry=0x7fff8f9727d0, d=d@entry=0x7fffffffb760) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2834
#171 0x0000555555c8a39e in exprBlock__cgen_13728 (p=p@entry=0x7fff8eb52cb0, n=0x7fff8f9727d0, d=d@entry=0x7fffffffb760) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:187
#172 0x0000555555c921da in genOrdinalCase__cgen_15636 (p=p@entry=0x7fff8eb52cb0, n=n@entry=0x7fff8f972530, d=d@entry=0x7fffffffb760) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:934
#173 0x0000555555c9564e in genCase__cgen_15792 (p=p@entry=0x7fff8eb52cb0, t=t@entry=0x7fff8f972530, d=d@entry=0x7fffffffb760) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:965
#174 0x0000555555bc52f3 in expr__cgen_11613 (p=p@entry=0x7fff8eb52cb0, n=n@entry=0x7fff8f972530, d=d@entry=0x7fffffffb760) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2896
#175 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff8eb52cb0, t=0x7fff8f972530) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#176 0x0000555555c5ecdb in genStmtList__cgen_25047 (p=p@entry=0x7fff8eb52cb0, n=n@entry=0x7fff8f95d1a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2599
#177 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7fff8eb52cb0, n=n@entry=0x7fff8f95d1a0, d=d@entry=0x7fffffffba10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#178 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7fff8eb52cb0, t=t@entry=0x7fff8f95d1a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#179 0x0000555555bd307f in genProcBody__cgen_27014 (p=p@entry=0x7fff8eb52cb0, procBody=procBody@entry=0x7fff8f95d1a0) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1018
#180 0x0000555555c1c9ee in genProcAux__cgen_27082 (m=m@entry=0x7ffff48be050, prc=prc@entry=0x7fff8ebbd410) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1077
#181 0x0000555555bce17d in genProcNoForward__cgen_27450 (m=m@entry=0x7ffff48be050, prc=prc@entry=0x7fff8ebbd410) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1213
#182 0x0000555555bce39d in genProc__cgen_422 (m=0x7ffff48be050, prc=prc@entry=0x7fff8ebbd410) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1239
#183 0x0000555555bc3689 in expr__cgen_11613 (p=p@entry=0x7ffff47f91b0, n=n@entry=0x7fff8f959b30, d=d@entry=0x7fffffffbf30) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2760
#184 0x0000555555bc69dd in initLocExpr__cgen_11636 (p=p@entry=0x7ffff47f91b0, e=0x7fff8f959b30, result=result@entry=0x7fffffffbf30) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:639
#185 0x0000555555c2efd8 in genPrefixCall__cgen_12487 (p=p@entry=0x7ffff47f91b0, le=le@entry=0x0, ri=ri@entry=0x7fff8ec18590, d=d@entry=0x7fffffffc150) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:402
#186 0x0000555555c3257b in genAsgnCall__cgen_13242 (p=p@entry=0x7ffff47f91b0, le=le@entry=0x0, ri=ri@entry=0x7fff8ec18590, d=d@entry=0x7fffffffc150) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:803
#187 0x0000555555c32833 in genCall__cgen_13272 (p=p@entry=0x7ffff47f91b0, e=e@entry=0x7fff8ec18590, d=d@entry=0x7fffffffc150) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgcalls.nim:805
#188 0x0000555555bc46b8 in expr__cgen_11613 (p=p@entry=0x7ffff47f91b0, n=n@entry=0x7fff8ec18590, d=d@entry=0x7fffffffc1d0) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2834
#189 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7ffff47f91b0, t=0x7fff8ec18590) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#190 0x0000555555c5ecdb in genStmtList__cgen_25047 (p=p@entry=0x7ffff47f91b0, n=n@entry=0x7fff8ec18d10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2599
#191 0x0000555555bc4df8 in expr__cgen_11613 (p=p@entry=0x7ffff47f91b0, n=n@entry=0x7fff8ec18d10, d=d@entry=0x7fffffffc480) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgexprs.nim:2870
#192 0x0000555555bb7c05 in genStmts__cgen_11610 (p=p@entry=0x7ffff47f91b0, t=t@entry=0x7fff8ec18d10) at /mnt/sda3/storage/CODE/status/Nim/compiler/ccgstmts.nim:1602
#193 0x0000555555bd307f in genProcBody__cgen_27014 (p=0x7ffff47f91b0, procBody=procBody@entry=0x7fff8ec18d10) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1018
#194 0x0000555555c9d170 in genTopLevelStmt__cgen_29576 (m=m@entry=0x7ffff48be050, n=n@entry=0x7fff8ec25f50) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1980
#195 0x0000555555c9d2a9 in myProcess__cgen_29584 (b=0x7ffff48be050, n=0x7fff8ec25f50) at /mnt/sda3/storage/CODE/status/Nim/compiler/cgen.nim:1986
#196 0x00005555558acd84 in processTopLevelStmt__passes_138 (graph=graph@entry=0x7ffff7c8d050, n=n@entry=0x7fff8ebebbf0, a=a@entry=0x7fffffffc890) at /mnt/sda3/storage/CODE/status/Nim/compiler/passes.nim:73
#197 0x00005555558ade6b in processModule__passes_231 (graph=graph@entry=0x7ffff7c8d050, module=module@entry=0x7ffff47f3050, idgen=<optimized out>, stream=stream@entry=0x0) at /mnt/sda3/storage/CODE/status/Nim/compiler/passes.nim:180
#198 0x0000555555cb1a01 in compileModule__modules_1709 (graph=graph@entry=0x7ffff7c8d050, fileIdx=fileIdx@entry=50, flags=flags@entry=16384, fromModule=fromModule@entry=0x0) at /mnt/sda3/storage/CODE/status/Nim/compiler/modules.nim:98
#199 0x0000555555cb2844 in compileProject__modules_2894 (graph=graph@entry=0x7ffff7c8d050, projectFileIdx=projectFileIdx@entry=-1) at /mnt/sda3/storage/CODE/status/Nim/compiler/modules.nim:178
#200 0x0000555555dbb1f0 in commandCompileToC__main_363 (graph=0x7ffff7c8d050) at /mnt/sda3/storage/CODE/status/Nim/compiler/main.nim:101
#201 0x0000555555dbb820 in compileToBackend__main_534 (ClE_0=ClE_0@entry=0x7ffff5a51890) at /mnt/sda3/storage/CODE/status/Nim/compiler/main.nim:245
#202 0x0000555555dbcfdc in mainCommand__main_504 (graph=graph@entry=0x7ffff7c8d050) at /mnt/sda3/storage/CODE/status/Nim/compiler/main.nim:275
#203 0x0000555555dc30e6 in handleCmdLine__nim_41 (cache=0x7ffff7c5b030, conf=0x7ffff7c51050) at /mnt/sda3/storage/CODE/status/Nim/compiler/nim.nim:94
#204 0x0000555555dc3a11 in NimMainModule () at /mnt/sda3/storage/CODE/status/Nim/compiler/nim.nim:139
#205 0x0000555555dc3a86 in NimMainInner () at /mnt/sda3/storage/CODE/status/Nim/lib/system.nim:2327
#206 0x0000555555dc38ea in NimMain () at /mnt/sda3/storage/CODE/status/Nim/lib/system.nim:2335
#207 0x0000555555dc3921 in main (argc=<optimized out>, args=<optimized out>, env=<optimized out>) at /mnt/sda3/storage/CODE/status/Nim/lib/system.nim:2342
$ nim -v
Nim Compiler Version 1.6.5 [Linux: amd64]
Compiled at 2022-02-26
Copyright (c) 2006-2021 by Andreas Rumpf

git hash: d7370ce26962b3b82e6b9be6562f6e88ba7ff86c
active boot switches: -d:release
$ nim -v
Nim Compiler Version 1.7.1 [Linux: amd64]
Compiled at 2022-02-26
Copyright (c) 2006-2022 by Andreas Rumpf

git hash: f0bfc0bd3f619c0933df5b71a0a04d4181d99880
active boot switches:
tersec commented 2 years ago

I was able to mostly minimize it -- no imports, no dependence on using a Nimbus build environment, et cetera:

type
  Result*[T, E] = object
    case o: bool
    of false:
      e: E
    of true:
      v: T

  Opt*[T] = Result[T, void]

template ok*[T, E](R: type Result[T, E], x: untyped): R =
  R(o: true, v: x)

template ok*[E](R: type Result[void, E]): R =
  R(o: true)

template ok*[T: not void, E](self: var Result[T, E], x: untyped) =
  self = ok(type self, x)

template ok*[E](self: var Result[void, E]) =
  self = (type self).ok()

template err*[T](R: type Result[T, void]): R =
  R(o: false)

template err*[T](self: var Result[T, void]) =
  self = err(type self)

template ok*(): auto = ok(typeof(result))

func mapErr*[T, E0](
    self: Result[T, E0], f: proc(x: E0)): Result[T, void] {.inline.} =
  if self.o:
    when T is void:
      result.ok()
    else:
      result.ok(self.v)
  else:
    f(self.e)
    result.err()

{.push raises: [Defect].}

type
  Ver* = distinct array[4, byte]
  ForkData* = object
    current_version*: Ver
    genesis_validators_root*: array[32, byte]

proc getBlockSSZ*(): Result[void, string] =
  ok()

proc getBlock*(
    T: type ForkData): Opt[T] =
  discard getBlockSSZ().mapErr(proc(x: auto) = discard)
  result.ok(default(T))

proc applyBlock() =
  let data = getBlock(ForkData)

applyBlock()

which, when run with gdb, via PATH=${PATH_TO_NIM_DEVEL}:${PATH} gdb --args nim c --hints:off --compileOnly -o:/dev/null sigsegv.nim shows:

Program received signal SIGSEGV, Segmentation fault.
0x0000555555896fb8 in allPathsAsgnResult__cgen_26861 ()
(gdb) bt
#0  0x0000555555896fb8 in allPathsAsgnResult__cgen_26861 ()
#1  0x00005555558979aa in allPathsAsgnResult__cgen_26861 ()
#2  0x00005555558979aa in allPathsAsgnResult__cgen_26861 ()
#3  0x00005555558979aa in allPathsAsgnResult__cgen_26861 ()
#4  0x00005555558979aa in allPathsAsgnResult__cgen_26861 ()
#5  0x00005555558979aa in allPathsAsgnResult__cgen_26861 ()
#6  0x00005555558979aa in allPathsAsgnResult__cgen_26861 ()
#7  0x00005555558979aa in allPathsAsgnResult__cgen_26861 ()
#8  0x0000555555897267 in allPathsAsgnResult__cgen_26861 ()
#9  0x000055555589e819 in genProcAux__cgen_27082 ()
#10 0x000055555589e8cf in genProc__cgen_422 ()
#11 0x00005555558bae3e in expr.cgen_11613 ()
#12 0x0000555555910c5c in genPrefixCall__cgen_12487 ()
#13 0x000055555591a8a3 in genSingleVar__cgen_14048.part.0 ()
#14 0x000055555591bd75 in genVarStmt__cgen_14293 ()
#15 0x000055555589c704 in genStmts__cgen_11610 ()
#16 0x000055555589d92e in genProcAux__cgen_27082 ()
#17 0x000055555589e8cf in genProc__cgen_422 ()
#18 0x00005555558bae3e in expr.cgen_11613 ()
#19 0x0000555555910c5c in genPrefixCall__cgen_12487 ()
#20 0x00005555558bb9c3 in expr.cgen_11613 ()
#21 0x000055555589c704 in genStmts__cgen_11610 ()
#22 0x00005555559256eb in myProcess__cgen_29584 ()
#23 0x00005555556e95a3 in processTopLevelStmt__passes_138 ()
#24 0x00005555556e9c83 in processModule__passes_231 ()
#25 0x000055555593008c in compileModule__modules_1709 ()
#26 0x00005555559bb9ca in commandCompileToC__main_363 ()
#27 0x00005555559bcb38 in mainCommand__main_504 ()
#28 0x00005555559bf310 in handleCmdLine__nim_41 ()
#29 0x00005555559bfaa1 in NimMainInner ()
#30 0x00005555559bfcc6 in NimMain ()
#31 0x000055555557091d in main ()

and appears to be the same issue.

Tested with

Nim Compiler Version 1.6.4 [Linux: amd64]
Compiled at 2022-02-10
Copyright (c) 2006-2021 by Andreas Rumpf

active boot switches: -d:release

and

Nim Compiler Version 1.7.1 [Linux: amd64]
Compiled at 2022-03-02
Copyright (c) 2006-2022 by Andreas Rumpf

git hash: 590d39785243afb6da3662cf77c842a5ff4e1412
active boot switches: -d:release

It does not occur on

Nim Compiler Version 1.2.16 [Linux: amd64]
Compiled at 2022-02-27
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: c6a9f27b3e36bae9aacec1bd6c37893fb98fd33f
active boot switches: -d:release

but rather compiles successfully.

ringabout commented 2 years ago

It works in 1.6.0 but fails in 1.6.2

It seems to be a regression related to https://github.com/nim-lang/Nim/pull/19115

ringabout commented 2 years ago

Reduce further:

type
  Result*[T] = object
    v: T

func mapErr*[T](
    self: Result[T], f: proc(x: T)): Result[T] {.inline.} =
  discard

{.push raises: [Defect].}

type
  ForkData* = object
    root*: array[32, byte]

proc getBlock*(
    T: type ForkData): Result[T] =
  discard mapErr(default(Result[T]), proc(x: any) = discard)

discard getBlock(ForkData)

{.pop.}