juancarlospaco / nimrun-action-minefield

Minefield
1 stars 0 forks source link

TESTS #6

Open juancarlospaco opened 1 month ago

juancarlospaco commented 1 month ago

testing only

juancarlospaco commented 1 month ago

!nim c --gc:orc --stacktrace:on --linedir:off

type
  Rlp* = object
    bytes: seq[byte]
    position*: int

  RlpNodeType* = enum
    rlpBlob
    rlpList

  RlpError* = object of CatchableError
  MalformedRlpError* = object of RlpError
  UnsupportedRlpError* = object of RlpError
  RlpTypeMismatch* = object of RlpError

  RlpItem = tuple[payload: Slice[int], typ: RlpNodeType]

func raiseExpectedBlob() {.noreturn, noinline.} =
  raise (ref RlpTypeMismatch)(msg: "expected blob")

func toString(self: Rlp, item: RlpItem): string =
  if item.typ != rlpBlob:
    raiseExpectedBlob()

  result = newString(item.payload.len)

func rlpItem(input: openArray[byte], start = 0): RlpItem =
  raise (ref ValueError)()

func item(self: Rlp, position: int): RlpItem =
  rlpItem(self.bytes, position)

func item(self: Rlp): RlpItem =
  self.item(self.position)

func toString(self: Rlp): string =
  self.toString(self.item())

func inspectAux(self: var Rlp, depth: int, hexOutput: bool, output: var string) =
  let str = self.toString()
  output = str

func inspect(self: Rlp, indent = 0, hexOutput = true): string =
  var rlpCopy = self
  result = newStringOfCap(self.bytes.len)
  inspectAux(rlpCopy, indent, hexOutput, result)

try:
  var rlp = Rlp(bytes: @[byte 0xfe, 0x00])
  echo inspect(rlp)
except ValueError:
  discard
github-actions[bot] commented 1 month ago
:penguin: Linux bisect by @juancarlospaco (owner)
devel :+1: OK

Output

``` ```

IR

Compiled filesize 107.72 Kb (110,304 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #include #define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); #define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); #define nimln_(n) \ FR_.line = n; #define nimlf_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tyObject_Rlp__yil5bzFeyxep4RX85fVtDg tyObject_Rlp__yil5bzFeyxep4RX85fVtDg; typedef struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ tySequence__6H5Oh5UUvVCLiakt9aTwtUQ; typedef struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tyObject_NimRawSeq__z7qH8tMsxS9a21KFJ8dD08w tyObject_NimRawSeq__z7qH8tMsxS9a21KFJ8dD08w; typedef struct tyTuple__vIQ5mVIiaBJeMlcahjZn8Q tyTuple__vIQ5mVIiaBJeMlcahjZn8Q; typedef struct tyObject_HSlice__vuwRJgdcPWbEO9cIdyL6bxA tyObject_HSlice__vuwRJgdcPWbEO9cIdyL6bxA; typedef struct tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w; typedef struct tyObject_RlpError__Xe9bRy2JaOsZcm9bERt7nRGg tyObject_RlpError__Xe9bRy2JaOsZcm9bERt7nRGg; typedef struct tyObject_CatchableError__9cyZ9aPQenU9bm4gpwSRVmfsA tyObject_CatchableError__9cyZ9aPQenU9bm4gpwSRVmfsA; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct TNimTypeV2 TNimTypeV2; typedef struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ; typedef struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content; typedef struct tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw; typedef struct tyObject_GcEnv__wrXjIZdIxCtzM9cDR1LtFhA tyObject_GcEnv__wrXjIZdIxCtzM9cDR1LtFhA; typedef struct tyObject_CellSeq__89bNXn3s6QKjCT39cWz9cQw5Q tyObject_CellSeq__89bNXn3s6QKjCT39cWz9cQw5Q; typedef struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q tyTuple__N4J9cV4JZGem3ljqqj5rT0Q; typedef struct tyObject_CellSeq__9aBhmPhRskpiCeptzlOeZyA tyObject_CellSeq__9aBhmPhRskpiCeptzlOeZyA; typedef struct tyTuple__JtsWbX86bdJaB04v6hfOnA tyTuple__JtsWbX86bdJaB04v6hfOnA; typedef struct tyObject_ValueError__PotCu49bK9cPOepZ9ae9b17fJA tyObject_ValueError__PotCu49bK9cPOepZ9ae9b17fJA; typedef struct tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg; struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ { NI len; tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content* p; }; struct tyObject_Rlp__yil5bzFeyxep4RX85fVtDg { tySequence__6H5Oh5UUvVCLiakt9aTwtUQ bytes; NI position; }; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tyObject_NimRawSeq__z7qH8tMsxS9a21KFJ8dD08w { NI len; void* p; }; struct tyObject_HSlice__vuwRJgdcPWbEO9cIdyL6bxA { NI a; NI b; }; typedef NU8 tyEnum_RlpNodeType__bD05kxDtfXU6MQHr861tNA; struct tyTuple__vIQ5mVIiaBJeMlcahjZn8Q { tyObject_HSlice__vuwRJgdcPWbEO9cIdyL6bxA Field0; tyEnum_RlpNodeType__bD05kxDtfXU6MQHr861tNA Field1; }; struct TNimTypeV2 { void* destructor; NI size; NI16 align; NI16 depth; NU32* display; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; void* vTable[SEQ_DECL_SIZE]; }; struct RootObj { TNimTypeV2* m_type; }; struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ { NI len; tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content* p; }; struct Exception { RootObj Sup; Exception* parent; NCSTRING name; NimStringV2 message; tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ trace; Exception* up; }; struct tyObject_CatchableError__9cyZ9aPQenU9bm4gpwSRVmfsA { Exception Sup; }; struct tyObject_RlpError__Xe9bRy2JaOsZcm9bERt7nRGg { tyObject_CatchableError__9cyZ9aPQenU9bm4gpwSRVmfsA Sup; }; struct tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w { tyObject_RlpError__Xe9bRy2JaOsZcm9bERt7nRGg Sup; }; struct tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw { NI rc; NI rootIdx; NI refId; }; struct tyObject_CellSeq__89bNXn3s6QKjCT39cWz9cQw5Q { NI len; NI cap; tyTuple__N4J9cV4JZGem3ljqqj5rT0Q* d; }; struct tyObject_CellSeq__9aBhmPhRskpiCeptzlOeZyA { NI len; NI cap; tyTuple__JtsWbX86bdJaB04v6hfOnA* d; }; struct tyObject_GcEnv__wrXjIZdIxCtzM9cDR1LtFhA { tyObject_CellSeq__89bNXn3s6QKjCT39cWz9cQw5Q traceStack; tyObject_CellSeq__9aBhmPhRskpiCeptzlOeZyA toFree; NI freed; NI touched; NI edges; NI rcSum; NIM_BOOL keepThreshold; }; struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q { void** Field0; TNimTypeV2* Field1; }; struct tyObject_ValueError__PotCu49bK9cPOepZ9ae9b17fJA { tyObject_CatchableError__9cyZ9aPQenU9bm4gpwSRVmfsA Sup; }; struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content { NI cap; NU8 data[SEQ_DECL_SIZE]; }; struct tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg { NCSTRING procname; NI line; NCSTRING filename; }; struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content { NI cap; tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg data[SEQ_DECL_SIZE]; }; static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1); static N_INLINE(void, nimSetMem__systemZmemory_u7)(void* a_p0, int v_p1, NI size_p2); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2); N_LIB_PRIVATE N_NIMCALL(NimStringV2, inspect__temp_u273)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, NI indent_p1, NIM_BOOL hexOutput_p2); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u288)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* dest_p0, tyObject_Rlp__yil5bzFeyxep4RX85fVtDg src_p1); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u163)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* dest_p0, tySequence__6H5Oh5UUvVCLiakt9aTwtUQ src_p1); static N_INLINE(NIM_BOOL, sameSeqPayload)(void* x_p0, void* y_p1); N_LIB_PRIVATE N_NIMCALL(void, setLen__temp_u180)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* s_p0, NI newlen_p1); N_NIMCALL(NimStringV2, rawNewString)(NI cap_p0); N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i_p0, NI64 a_p1, NI64 b_p2); N_LIB_PRIVATE N_NIMCALL(void, inspectAux__temp_u267)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* self_p0, NI depth_p1, NIM_BOOL hexOutput_p2, NimStringV2* output_p3); N_LIB_PRIVATE N_NIMCALL(NimStringV2, toString__temp_u264)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0); N_LIB_PRIVATE N_NIMCALL(NimStringV2, toString__temp_u85)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, tyTuple__vIQ5mVIiaBJeMlcahjZn8Q item_p1); N_LIB_PRIVATE N_NOINLINE(void, raiseExpectedBlob__temp_u23)(void); N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1); N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u329)(void* dest_p0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u27)(tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w* dest_p0); static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0); static N_INLINE(NI, minuspercent___system_u803)(NI x_p0, NI y_p1); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4963)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void); N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3860)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw* s_p1, TNimTypeV2* desc_p2); N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0); N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p_p0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___stdZassertions_u75)(tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ dest_p0); N_LIB_PRIVATE N_NIMCALL(void, eqtrace___temp_u39)(tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w* dest_p0, void* env_p1); static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1); static N_INLINE(void, add__system_u3338)(tyObject_CellSeq__89bNXn3s6QKjCT39cWz9cQw5Q* s_p0, void** c_p1, TNimTypeV2* t_p2); N_LIB_PRIVATE N_NIMCALL(void, resize__system_u3346)(tyObject_CellSeq__89bNXn3s6QKjCT39cWz9cQw5Q* s_p0); N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e_p0, NCSTRING ename_p1, NCSTRING procname_p2, NCSTRING filename_p3, NI line_p4); N_NIMCALL(NimStringV2, mnewString)(NI len_p0); static N_INLINE(NI, len__temp_u98)(tyObject_HSlice__vuwRJgdcPWbEO9cIdyL6bxA x_p0); N_LIB_PRIVATE N_NIMCALL(tyTuple__vIQ5mVIiaBJeMlcahjZn8Q, item__temp_u261)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0); N_LIB_PRIVATE N_NIMCALL(tyTuple__vIQ5mVIiaBJeMlcahjZn8Q, item__temp_u114)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, NI position_p1); N_LIB_PRIVATE N_NIMCALL(tyTuple__vIQ5mVIiaBJeMlcahjZn8Q, rlpItem__temp_u110)(NU8* input_p0, NI input_p0Len_0, NI start_p1); N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2628)(NimStringV2* dest_p0, NimStringV2 src_p1); N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___system_u2619)(NimStringV2* dest_p0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u285)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* dest_p0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u160)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ dest_p0); N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(void, popCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___stdZtypedthreads_u205)(Exception** dest_p0, Exception* src_p1, NIM_BOOL cyclic_p2); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE TNimTypeV2 NTIv2__sYRCRoErwzo9aDEHYwv2L4w_; static const struct { NI cap; NIM_CHAR data[13+1]; } TM__h69aKLv9bAieBdiFzvDngbMw_5 = { 13 | NIM_STRLIT_FLAG, "expected blob" }; static const NimStringV2 TM__h69aKLv9bAieBdiFzvDngbMw_6 = {13, (NimStrPayload*)&TM__h69aKLv9bAieBdiFzvDngbMw_5}; extern TNimTypeV2 NTIv2__PotCu49bK9cPOepZ9ae9b17fJA_; N_LIB_PRIVATE tyObject_Rlp__yil5bzFeyxep4RX85fVtDg rlp__temp_u307; extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4747; extern NIM_THREADVAR TFrame* framePtr__system_u2655; static NIM_CONST NU32 TM__h69aKLv9bAieBdiFzvDngbMw_3[5] = {3701606400, 1285336064, 645741824, 4019309312, 2218935808}; N_LIB_PRIVATE TNimTypeV2 NTIv2__sYRCRoErwzo9aDEHYwv2L4w_ = {.destructor = (void*)rttiDestroy__temp_u329, .size = sizeof(tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w), .align = (NI16) NIM_ALIGNOF(tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w), .depth = 4, .display = TM__h69aKLv9bAieBdiFzvDngbMw_3, .traceImpl = (void*)eqtrace___temp_u39, .flags = 0}; extern NIM_THREADVAR Exception* currException__system_u4412; static N_INLINE(void, nimSetMem__systemZmemory_u7)(void* a_p0, int v_p1, NI size_p2) { void* T1_; T1_ = (void*)0; T1_ = memset(a_p0, v_p1, ((size_t) (size_p2))); } static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; result = (&nimInErrorMode__system_u4747); return result; } static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); nimSetMem__systemZmemory_u7(p_p0, ((int)0), size_p1); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; } static N_INLINE(NIM_BOOL, sameSeqPayload)(void* x_p0, void* y_p1) { NIM_BOOL result; result = ((*((tyObject_NimRawSeq__z7qH8tMsxS9a21KFJ8dD08w*) (x_p0))).p == (*((tyObject_NimRawSeq__z7qH8tMsxS9a21KFJ8dD08w*) (y_p1))).p); return result; } N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u163)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* dest_p0, tySequence__6H5Oh5UUvVCLiakt9aTwtUQ src_p1) { NI T6_; NI colontmp_; { { NIM_BOOL T3_; T3_ = (NIM_BOOL)0; T3_ = sameSeqPayload(dest_p0, (&src_p1)); if (!T3_) goto LA4_; goto BeforeRet_; } LA4_: ; T6_ = src_p1.len; setLen__temp_u180((&(*dest_p0)), T6_); colontmp_ = ((NI)0); { while (1) { NI T9_; T9_ = (*dest_p0).len; if (!(colontmp_ < T9_)) goto LA8; (*dest_p0).p->data[colontmp_] = src_p1.p->data[colontmp_]; colontmp_ += ((NI)1); } LA8: ; } }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u288)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* dest_p0, tyObject_Rlp__yil5bzFeyxep4RX85fVtDg src_p1) { eqcopy___temp_u163((&(*dest_p0).bytes), src_p1.bytes); (*dest_p0).position = src_p1.position; } static N_INLINE(void, nimFrame)(TFrame* s_p0) { { if (!(framePtr__system_u2655 == ((TFrame*) NIM_NIL))) goto LA3_; (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { (*s_p0).calldepth = (NI16)((*framePtr__system_u2655).calldepth + ((NI16)1)); } LA1_: ; (*s_p0).prev = framePtr__system_u2655; framePtr__system_u2655 = s_p0; { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; callDepthLimitReached__system_u4963(); } LA8_: ; } static N_INLINE(void, popFrame)(void) { framePtr__system_u2655 = (*framePtr__system_u2655).prev; } static N_INLINE(NI, minuspercent___system_u803)(NI x_p0, NI y_p1) { NI result; nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arithmetics.nim"); result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1)))))); popFrame(); return result; } static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) { NIM_BOOL result; NIM_BOOL* nimErr_; nimfr_("nimDecRefIsLastCyclicDyn", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/orc.nim"); {nimErr_ = nimErrorFlag(); result = (NIM_BOOL)0; { tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw* cell; NI T5_; if (!!((p_p0 == NIM_NIL))) goto LA3_; T5_ = (NI)0; T5_ = minuspercent___system_u803(((NI) (ptrdiff_t) (p_p0)), ((NI)24)); cell = ((tyObject_RefHeader__YmUax3FsG7Gnj3DF0PcAlw*) (T5_)); { if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_; result = NIM_TRUE; } goto LA6_; LA8_: ; { NI TM__h69aKLv9bAieBdiFzvDngbMw_2; if (nimSubInt((*cell).rc, ((NI)16), &TM__h69aKLv9bAieBdiFzvDngbMw_2)) { raiseOverflow(); goto BeforeRet_; }; (*cell).rc = (NI)(TM__h69aKLv9bAieBdiFzvDngbMw_2); } LA6_: ; rememberCycle__system_u3860(result, cell, (*((TNimTypeV2**) (p_p0)))); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA3_: ; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u27)(tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w* dest_p0) { { NIM_BOOL T3_; T3_ = (NIM_BOOL)0; T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.parent); if (!T3_) goto LA4_; nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.parent); } LA4_: ; if ((*dest_p0).Sup.Sup.Sup.message.p && !((*dest_p0).Sup.Sup.Sup.message.p->cap & NIM_STRLIT_FLAG)) { deallocShared((*dest_p0).Sup.Sup.Sup.message.p); } eqdestroy___stdZassertions_u75((*dest_p0).Sup.Sup.Sup.trace); { NIM_BOOL T8_; T8_ = (NIM_BOOL)0; T8_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.up); if (!T8_) goto LA9_; nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.up); } LA9_: ; } N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u329)(void* dest_p0) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); eqdestroy___temp_u27(((tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w*) (dest_p0))); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; } static N_INLINE(void, add__system_u3338)(tyObject_CellSeq__89bNXn3s6QKjCT39cWz9cQw5Q* s_p0, void** c_p1, TNimTypeV2* t_p2) { void** colontmp_; TNimTypeV2* colontmp__2; NI TM__h69aKLv9bAieBdiFzvDngbMw_4; nimfr_("add", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/cellseqs_v2.nim"); { { if (!((*s_p0).cap <= (*s_p0).len)) goto LA3_; resize__system_u3346(s_p0); } LA3_: ; colontmp_ = c_p1; colontmp__2 = t_p2; (*s_p0).d[(*s_p0).len].Field0 = colontmp_; (*s_p0).d[(*s_p0).len].Field1 = colontmp__2; if (nimAddInt((*s_p0).len, ((NI)1), &TM__h69aKLv9bAieBdiFzvDngbMw_4)) { raiseOverflow(); goto BeforeRet_; }; (*s_p0).len = (NI)(TM__h69aKLv9bAieBdiFzvDngbMw_4); }BeforeRet_: ; popFrame(); } static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1) { void** p; nimfr_("nimTraceRefDyn", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/orc.nim"); p = ((void**) (q_p0)); { tyObject_GcEnv__wrXjIZdIxCtzM9cDR1LtFhA* j; if (!!(((*p) == NIM_NIL))) goto LA3_; j = ((tyObject_GcEnv__wrXjIZdIxCtzM9cDR1LtFhA*) (env_p1)); add__system_u3338((&(*j).traceStack), p, (*((TNimTypeV2**) ((*p))))); } LA3_: ; popFrame(); } N_LIB_PRIVATE N_NIMCALL(void, eqtrace___temp_u39)(tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w* dest_p0, void* env_p1) { nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.parent, env_p1); nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.up, env_p1); } N_LIB_PRIVATE N_NOINLINE(void, raiseExpectedBlob__temp_u23)(void) { tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w* T1_; nimfr_("raiseExpectedBlob", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); { T1_ = NIM_NIL; T1_ = (tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w*) nimNewObj(sizeof(tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w), NIM_ALIGNOF(tyObject_RlpTypeMismatch__sYRCRoErwzo9aDEHYwv2L4w)); (*T1_).Sup.Sup.Sup.Sup.m_type = (&NTIv2__sYRCRoErwzo9aDEHYwv2L4w_); (*T1_).Sup.Sup.Sup.name = "RlpTypeMismatch"; (*T1_).Sup.Sup.Sup.message = TM__h69aKLv9bAieBdiFzvDngbMw_6; raiseExceptionEx((Exception*)T1_, "RlpTypeMismatch", "raiseExpectedBlob", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim", 14); goto BeforeRet_; }BeforeRet_: ; popFrame(); } static N_INLINE(NI, len__temp_u98)(tyObject_HSlice__vuwRJgdcPWbEO9cIdyL6bxA x_p0) { NI result; NI TM__h69aKLv9bAieBdiFzvDngbMw_7; NI TM__h69aKLv9bAieBdiFzvDngbMw_8; nimfr_("len", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system.nim"); { if (nimSubInt(x_p0.b, x_p0.a, &TM__h69aKLv9bAieBdiFzvDngbMw_7)) { raiseOverflow(); goto BeforeRet_; }; if (nimAddInt((NI)(TM__h69aKLv9bAieBdiFzvDngbMw_7), ((NI)1), &TM__h69aKLv9bAieBdiFzvDngbMw_8)) { raiseOverflow(); goto BeforeRet_; }; result = ((((NI)0) >= (NI)(TM__h69aKLv9bAieBdiFzvDngbMw_8)) ? ((NI)0) : (NI)(TM__h69aKLv9bAieBdiFzvDngbMw_8)); }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(NimStringV2, toString__temp_u85)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, tyTuple__vIQ5mVIiaBJeMlcahjZn8Q item_p1) { NimStringV2 result; NI T5_; NIM_BOOL* nimErr_; nimfr_("toString", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); result.len = 0; result.p = NIM_NIL; { if (!!((item_p1.Field1 == ((tyEnum_RlpNodeType__bD05kxDtfXU6MQHr861tNA)0)))) goto LA3_; raiseExpectedBlob__temp_u23(); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA3_: ; T5_ = (NI)0; T5_ = len__temp_u98(item_p1.Field0); if ((T5_) < ((NI)0) || (T5_) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(T5_, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_; } result = mnewString(((NI) (T5_))); }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(tyTuple__vIQ5mVIiaBJeMlcahjZn8Q, rlpItem__temp_u110)(NU8* input_p0, NI input_p0Len_0, NI start_p1) { tyTuple__vIQ5mVIiaBJeMlcahjZn8Q result; tyObject_ValueError__PotCu49bK9cPOepZ9ae9b17fJA* T1_; nimfr_("rlpItem", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); { nimZeroMem((void*)(&result), sizeof(tyTuple__vIQ5mVIiaBJeMlcahjZn8Q)); T1_ = NIM_NIL; T1_ = (tyObject_ValueError__PotCu49bK9cPOepZ9ae9b17fJA*) nimNewObj(sizeof(tyObject_ValueError__PotCu49bK9cPOepZ9ae9b17fJA), NIM_ALIGNOF(tyObject_ValueError__PotCu49bK9cPOepZ9ae9b17fJA)); (*T1_).Sup.Sup.Sup.m_type = (&NTIv2__PotCu49bK9cPOepZ9ae9b17fJA_); (*T1_).Sup.Sup.name = "ValueError"; raiseExceptionEx((Exception*)T1_, "ValueError", "rlpItem", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim", 20); goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(tyTuple__vIQ5mVIiaBJeMlcahjZn8Q, item__temp_u114)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, NI position_p1) { tyTuple__vIQ5mVIiaBJeMlcahjZn8Q result; NIM_BOOL* nimErr_; nimfr_("item", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); result = rlpItem__temp_u110(((self_p0.bytes).p) ? (self_p0.bytes.p->data) : NIM_NIL, self_p0.bytes.len, position_p1); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(tyTuple__vIQ5mVIiaBJeMlcahjZn8Q, item__temp_u261)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0) { tyTuple__vIQ5mVIiaBJeMlcahjZn8Q result; NIM_BOOL* nimErr_; nimfr_("item", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); result = item__temp_u114(self_p0, self_p0.position); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(NimStringV2, toString__temp_u264)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0) { NimStringV2 result; tyTuple__vIQ5mVIiaBJeMlcahjZn8Q T1_; NIM_BOOL* nimErr_; nimfr_("toString", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); T1_ = item__temp_u261(self_p0); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; result = toString__temp_u85(self_p0, T1_); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(void, inspectAux__temp_u267)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* self_p0, NI depth_p1, NIM_BOOL hexOutput_p2, NimStringV2* output_p3) { NimStringV2 str; NIM_BOOL* nimErr_; nimfr_("inspectAux", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); str.len = 0; str.p = NIM_NIL; str = toString__temp_u264((*self_p0)); if (NIM_UNLIKELY(*nimErr_)) goto LA1_; eqsink___system_u2628((&(*output_p3)), str); eqwasMoved___system_u2619((&str)); { LA1_:; } { if (str.p && !(str.p->cap & NIM_STRLIT_FLAG)) { deallocShared(str.p); } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); } N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u160)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ dest_p0) { if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) { alignedDealloc(dest_p0.p, NIM_ALIGNOF(NU8)); } } N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u285)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* dest_p0) { eqdestroy___temp_u160((*dest_p0).bytes); } N_LIB_PRIVATE N_NIMCALL(NimStringV2, inspect__temp_u273)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, NI indent_p1, NIM_BOOL hexOutput_p2) { NimStringV2 result; tyObject_Rlp__yil5bzFeyxep4RX85fVtDg rlpCopy; NI T2_; NIM_BOOL* nimErr_; nimfr_("inspect", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); result.len = 0; result.p = NIM_NIL; nimZeroMem((void*)(&rlpCopy), sizeof(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg)); eqcopy___temp_u288((&rlpCopy), self_p0); T2_ = self_p0.bytes.len; if ((T2_) < ((NI)0) || (T2_) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(T2_, ((NI)0), ((NI)IL64(9223372036854775807))); goto LA1_; } result = rawNewString(((NI) (T2_))); inspectAux__temp_u267((&rlpCopy), indent_p1, hexOutput_p2, (&result)); if (NIM_UNLIKELY(*nimErr_)) goto LA1_; { LA1_:; } { eqdestroy___temp_u285((&rlpCopy)); } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2) { NIM_BOOL result; NIM_BOOL T1_; nimfr_("isObjDisplayCheck", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arc.nim"); T1_ = (NIM_BOOL)0; T1_ = (targetDepth_p1 <= (*source_p0).depth); if (!(T1_)) goto LA2_; T1_ = ((*source_p0).display[targetDepth_p1] == token_p2); LA2_: ; result = T1_; popFrame(); return result; } static N_INLINE(Exception*, nimBorrowCurrentException)(void) { Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system.nim"); result = currException__system_u4412; popFrame(); return result; } static N_INLINE(void, popCurrentException)(void) { eqcopy___stdZtypedthreads_u205(&currException__system_u4412, (*currException__system_u4412).up, NIM_FALSE); } N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { #if 0 void (*volatile inner)(void); inner = PreMainInner; atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000(); (*inner)(); #else atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000(); PreMainInner(); #endif } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { #if 0 void (*volatile inner)(void); PreMain(); inner = NimMainInner; (*inner)(); #else PreMain(); NimMainInner(); #endif } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { { NimStringV2 colontmpD_; tyArray__nHXaesL0DJZHyVS07ARPRA T3_; NimStringV2 T4_; NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); nimErr_ = nimErrorFlag(); colontmpD_.len = 0; colontmpD_.p = NIM_NIL; nimZeroMem((void*)(&rlp__temp_u307), sizeof(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg)); rlp__temp_u307.bytes.len = 2; rlp__temp_u307.bytes.p = (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content*) newSeqPayload(2, sizeof(NU8), NIM_ALIGNOF(NU8)); rlp__temp_u307.bytes.p->data[0] = ((NU8)254); rlp__temp_u307.bytes.p->data[1] = ((NU8)0); T4_.len = 0; T4_.p = NIM_NIL; T4_ = inspect__temp_u273(rlp__temp_u307, ((NI)0), NIM_TRUE); if (NIM_UNLIKELY(*nimErr_)) goto LA2_; colontmpD_ = T4_; T3_[0] = colontmpD_; echoBinSafe(T3_, 1); { LA2_:; } { if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) { deallocShared(colontmpD_.p); } eqdestroy___temp_u285((&rlp__temp_u307)); } if (NIM_UNLIKELY(*nimErr_)) goto LA1_; if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObjDisplayCheck(nimBorrowCurrentException()->Sup.m_type, 3, 2336406272)) { *nimErr_ = NIM_FALSE; popCurrentException(); LA8_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2024-05-25T15:11:04
  • Finished 2024-05-25T15:11:04
  • Duration
stable :+1: OK

Output

``` ```

IR

Compiled filesize 105.46 Kb (107,992 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #include #define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); #define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); #define nimln_(n) \ FR_.line = n; #define nimlf_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tyObject_Rlp__yil5bzFeyxep4RX85fVtDg tyObject_Rlp__yil5bzFeyxep4RX85fVtDg; typedef struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ tySequence__6H5Oh5UUvVCLiakt9aTwtUQ; typedef struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tyTuple__Ko7uxha9anSfs0suKla39bGw tyTuple__Ko7uxha9anSfs0suKla39bGw; typedef struct tyObject_HSlice__EwLGRdWp29coLkI2h8HZj3g tyObject_HSlice__EwLGRdWp29coLkI2h8HZj3g; typedef struct tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw; typedef struct tyObject_RlpError__kXZ5BXFamIa3usMcBI3IKg tyObject_RlpError__kXZ5BXFamIa3usMcBI3IKg; typedef struct tyObject_CatchableError__13ogPiG6LWnhCHML56G43w tyObject_CatchableError__13ogPiG6LWnhCHML56G43w; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct TNimTypeV2 TNimTypeV2; typedef struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ; typedef struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content; typedef struct tyObject_RefHeader__bT6rHCap81aoFk2UwTCpIw tyObject_RefHeader__bT6rHCap81aoFk2UwTCpIw; typedef struct tyObject_GcEnv__j84pNQILrZ9cOIbTYBp870Q tyObject_GcEnv__j84pNQILrZ9cOIbTYBp870Q; typedef struct tyObject_CellSeq__qscGlmNX1ZQ0aOgcB3BBzA tyObject_CellSeq__qscGlmNX1ZQ0aOgcB3BBzA; typedef struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q tyTuple__N4J9cV4JZGem3ljqqj5rT0Q; typedef struct tyObject_CellSeq__jjtKhmLePnvmbddp1penhg tyObject_CellSeq__jjtKhmLePnvmbddp1penhg; typedef struct tyTuple__tsaIZZx1MIFpIQ9chWA9aCUQ tyTuple__tsaIZZx1MIFpIQ9chWA9aCUQ; typedef struct tyObject_ValueError__g37cfbeS6vAfeNwSM6g6XA tyObject_ValueError__g37cfbeS6vAfeNwSM6g6XA; typedef struct tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ; struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ { NI len; tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content* p; }; struct tyObject_Rlp__yil5bzFeyxep4RX85fVtDg { tySequence__6H5Oh5UUvVCLiakt9aTwtUQ bytes; NI position; }; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tyObject_HSlice__EwLGRdWp29coLkI2h8HZj3g { NI a; NI b; }; typedef NU8 tyEnum_RlpNodeType__bD05kxDtfXU6MQHr861tNA; struct tyTuple__Ko7uxha9anSfs0suKla39bGw { tyObject_HSlice__EwLGRdWp29coLkI2h8HZj3g Field0; tyEnum_RlpNodeType__bD05kxDtfXU6MQHr861tNA Field1; }; struct TNimTypeV2 { void* destructor; NI size; NI16 align; NI16 depth; NU32* display; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; }; struct RootObj { TNimTypeV2* m_type; }; struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ { NI len; tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content* p; }; struct Exception { RootObj Sup; Exception* parent; NCSTRING name; NimStringV2 message; tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ trace; Exception* up; }; struct tyObject_CatchableError__13ogPiG6LWnhCHML56G43w { Exception Sup; }; struct tyObject_RlpError__kXZ5BXFamIa3usMcBI3IKg { tyObject_CatchableError__13ogPiG6LWnhCHML56G43w Sup; }; struct tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw { tyObject_RlpError__kXZ5BXFamIa3usMcBI3IKg Sup; }; struct tyObject_RefHeader__bT6rHCap81aoFk2UwTCpIw { NI rc; NI rootIdx; NI refId; }; struct tyObject_CellSeq__qscGlmNX1ZQ0aOgcB3BBzA { NI len; NI cap; tyTuple__N4J9cV4JZGem3ljqqj5rT0Q* d; }; struct tyObject_CellSeq__jjtKhmLePnvmbddp1penhg { NI len; NI cap; tyTuple__tsaIZZx1MIFpIQ9chWA9aCUQ* d; }; struct tyObject_GcEnv__j84pNQILrZ9cOIbTYBp870Q { tyObject_CellSeq__qscGlmNX1ZQ0aOgcB3BBzA traceStack; tyObject_CellSeq__jjtKhmLePnvmbddp1penhg toFree; NI freed; NI touched; NI edges; NI rcSum; NIM_BOOL keepThreshold; }; struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q { void** Field0; TNimTypeV2* Field1; }; struct tyObject_ValueError__g37cfbeS6vAfeNwSM6g6XA { tyObject_CatchableError__13ogPiG6LWnhCHML56G43w Sup; }; struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content { NI cap; NU8 data[SEQ_DECL_SIZE]; }; struct tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ { NCSTRING procname; NI line; NCSTRING filename; }; struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content { NI cap; tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ data[SEQ_DECL_SIZE]; }; static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1); static N_INLINE(void, nimSetMem__systemZmemory_u7)(void* a_p0, int v_p1, NI size_p2); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2); N_LIB_PRIVATE N_NIMCALL(NimStringV2, inspect__temp_u311)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, NI indent_p1, NIM_BOOL hexOutput_p2); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u326)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* dest_p0, tyObject_Rlp__yil5bzFeyxep4RX85fVtDg src_p1); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u163)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* dest_p0, tySequence__6H5Oh5UUvVCLiakt9aTwtUQ src_p1); N_LIB_PRIVATE N_NIMCALL(void, setLen__temp_u180)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* s_p0, NI newlen_p1); N_NIMCALL(NimStringV2, rawNewString)(NI cap_p0); N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i_p0, NI64 a_p1, NI64 b_p2); N_LIB_PRIVATE N_NIMCALL(void, inspectAux__temp_u305)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* self_p0, NI depth_p1, NIM_BOOL hexOutput_p2, NimStringV2* output_p3); N_LIB_PRIVATE N_NIMCALL(NimStringV2, toString__temp_u302)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0); N_LIB_PRIVATE N_NIMCALL(NimStringV2, toString__temp_u85)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, tyTuple__Ko7uxha9anSfs0suKla39bGw item_p1); N_LIB_PRIVATE N_NOINLINE(void, raiseExpectedBlob__temp_u23)(void); N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1); N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u367)(void* dest_p0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u27)(tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw* dest_p0); static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0); static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u5035)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void); N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3827)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__bT6rHCap81aoFk2UwTCpIw* s_p1, TNimTypeV2* desc_p2); N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0); N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p_p0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___stdZassertions_u91)(tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ dest_p0); N_LIB_PRIVATE N_NIMCALL(void, eqtrace___temp_u39)(tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw* dest_p0, void* env_p1); static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1); static N_INLINE(void, add__system_u3291)(tyObject_CellSeq__qscGlmNX1ZQ0aOgcB3BBzA* s_p0, void** c_p1, TNimTypeV2* t_p2); N_LIB_PRIVATE N_NIMCALL(void, resize__system_u3299)(tyObject_CellSeq__qscGlmNX1ZQ0aOgcB3BBzA* s_p0); N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e_p0, NCSTRING ename_p1, NCSTRING procname_p2, NCSTRING filename_p3, NI line_p4); N_NIMCALL(NimStringV2, mnewString)(NI len_p0); static N_INLINE(NI, len__temp_u98)(tyObject_HSlice__EwLGRdWp29coLkI2h8HZj3g x_p0); N_LIB_PRIVATE N_NIMCALL(tyTuple__Ko7uxha9anSfs0suKla39bGw, item__temp_u299)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0); N_LIB_PRIVATE N_NIMCALL(tyTuple__Ko7uxha9anSfs0suKla39bGw, item__temp_u114)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, NI position_p1); N_LIB_PRIVATE N_NIMCALL(tyTuple__Ko7uxha9anSfs0suKla39bGw, rlpItem__temp_u110)(NU8* input_p0, NI input_p0Len_0, NI start_p1); N_LIB_PRIVATE N_NIMCALL(void, eqsink___stdZassertions_u36)(NimStringV2* dest_p0, NimStringV2 src_p1); N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___stdZassertions_u27)(NimStringV2* dest_p0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u323)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* dest_p0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u160)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ dest_p0); N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(void, popCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___stdZtypedthreads_u207)(Exception** dest_p0, Exception* src_p1, NIM_BOOL cyclic_p2); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE TNimTypeV2 NTIv2__dFD3QFzFLTXpRPX7gIqhDw_; static const struct { NI cap; NIM_CHAR data[13+1]; } TM__h69aKLv9bAieBdiFzvDngbMw_5 = { 13 | NIM_STRLIT_FLAG, "expected blob" }; static const NimStringV2 TM__h69aKLv9bAieBdiFzvDngbMw_6 = {13, (NimStrPayload*)&TM__h69aKLv9bAieBdiFzvDngbMw_5}; extern TNimTypeV2 NTIv2__g37cfbeS6vAfeNwSM6g6XA_; N_LIB_PRIVATE tyObject_Rlp__yil5bzFeyxep4RX85fVtDg rlp__temp_u345; extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4817; extern NIM_THREADVAR TFrame* framePtr__system_u4434; static NIM_CONST NU32 TM__h69aKLv9bAieBdiFzvDngbMw_3[5] = {3701606400, 1285336064, 2048933376, 1987642624, 1358381056}; N_LIB_PRIVATE TNimTypeV2 NTIv2__dFD3QFzFLTXpRPX7gIqhDw_ = {.destructor = (void*)rttiDestroy__temp_u367, .size = sizeof(tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw), .align = (NI16) NIM_ALIGNOF(tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw), .depth = 4, .display = TM__h69aKLv9bAieBdiFzvDngbMw_3, .traceImpl = (void*)eqtrace___temp_u39, .flags = 0}; extern NIM_THREADVAR Exception* currException__system_u4436; static N_INLINE(void, nimSetMem__systemZmemory_u7)(void* a_p0, int v_p1, NI size_p2) { void* T1_; T1_ = (void*)0; T1_ = memset(a_p0, v_p1, ((size_t) (size_p2))); } static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; result = (&nimInErrorMode__system_u4817); return result; } static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); nimSetMem__systemZmemory_u7(p_p0, ((int)0), size_p1); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u163)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* dest_p0, tySequence__6H5Oh5UUvVCLiakt9aTwtUQ src_p1) { NI T1_; NI colontmp_; T1_ = src_p1.len; setLen__temp_u180((&(*dest_p0)), T1_); colontmp_ = ((NI)0); { while (1) { NI T4_; T4_ = (*dest_p0).len; if (!(colontmp_ < T4_)) goto LA3; (*dest_p0).p->data[colontmp_] = src_p1.p->data[colontmp_]; colontmp_ += ((NI)1); } LA3: ; } } N_LIB_PRIVATE N_NIMCALL(void, eqcopy___temp_u326)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* dest_p0, tyObject_Rlp__yil5bzFeyxep4RX85fVtDg src_p1) { eqcopy___temp_u163((&(*dest_p0).bytes), src_p1.bytes); (*dest_p0).position = src_p1.position; } static N_INLINE(void, nimFrame)(TFrame* s_p0) { { if (!(framePtr__system_u4434 == ((TFrame*) NIM_NIL))) goto LA3_; (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { (*s_p0).calldepth = (NI16)((*framePtr__system_u4434).calldepth + ((NI16)1)); } LA1_: ; (*s_p0).prev = framePtr__system_u4434; framePtr__system_u4434 = s_p0; { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; callDepthLimitReached__system_u5035(); } LA8_: ; } static N_INLINE(void, popFrame)(void) { framePtr__system_u4434 = (*framePtr__system_u4434).prev; } static N_INLINE(NI, minuspercent___system_u810)(NI x_p0, NI y_p1) { NI result; nimfr_("-%", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/arithmetics.nim"); result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1)))))); popFrame(); return result; } static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) { NIM_BOOL result; NIM_BOOL* nimErr_; nimfr_("nimDecRefIsLastCyclicDyn", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/orc.nim"); {nimErr_ = nimErrorFlag(); result = (NIM_BOOL)0; { tyObject_RefHeader__bT6rHCap81aoFk2UwTCpIw* cell; NI T5_; if (!!((p_p0 == NIM_NIL))) goto LA3_; T5_ = (NI)0; T5_ = minuspercent___system_u810(((NI) (ptrdiff_t) (p_p0)), ((NI)24)); cell = ((tyObject_RefHeader__bT6rHCap81aoFk2UwTCpIw*) (T5_)); { if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_; result = NIM_TRUE; } goto LA6_; LA8_: ; { NI TM__h69aKLv9bAieBdiFzvDngbMw_2; if (nimSubInt((*cell).rc, ((NI)16), &TM__h69aKLv9bAieBdiFzvDngbMw_2)) { raiseOverflow(); goto BeforeRet_; }; (*cell).rc = (NI)(TM__h69aKLv9bAieBdiFzvDngbMw_2); } LA6_: ; rememberCycle__system_u3827(result, cell, (*((TNimTypeV2**) (p_p0)))); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA3_: ; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u27)(tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw* dest_p0) { { NIM_BOOL T3_; T3_ = (NIM_BOOL)0; T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.parent); if (!T3_) goto LA4_; nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.parent); } LA4_: ; if ((*dest_p0).Sup.Sup.Sup.message.p && !((*dest_p0).Sup.Sup.Sup.message.p->cap & NIM_STRLIT_FLAG)) { deallocShared((*dest_p0).Sup.Sup.Sup.message.p); } eqdestroy___stdZassertions_u91((*dest_p0).Sup.Sup.Sup.trace); { NIM_BOOL T8_; T8_ = (NIM_BOOL)0; T8_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.up); if (!T8_) goto LA9_; nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.up); } LA9_: ; } N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__temp_u367)(void* dest_p0) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); eqdestroy___temp_u27(((tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw*) (dest_p0))); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; } static N_INLINE(void, add__system_u3291)(tyObject_CellSeq__qscGlmNX1ZQ0aOgcB3BBzA* s_p0, void** c_p1, TNimTypeV2* t_p2) { void** colontmp_; TNimTypeV2* colontmp__2; NI TM__h69aKLv9bAieBdiFzvDngbMw_4; nimfr_("add", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/cellseqs_v2.nim"); { { if (!((*s_p0).cap <= (*s_p0).len)) goto LA3_; resize__system_u3299(s_p0); } LA3_: ; colontmp_ = c_p1; colontmp__2 = t_p2; (*s_p0).d[(*s_p0).len].Field0 = colontmp_; (*s_p0).d[(*s_p0).len].Field1 = colontmp__2; if (nimAddInt((*s_p0).len, ((NI)1), &TM__h69aKLv9bAieBdiFzvDngbMw_4)) { raiseOverflow(); goto BeforeRet_; }; (*s_p0).len = (NI)(TM__h69aKLv9bAieBdiFzvDngbMw_4); }BeforeRet_: ; popFrame(); } static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1) { void** p; nimfr_("nimTraceRefDyn", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/orc.nim"); p = ((void**) (q_p0)); { tyObject_GcEnv__j84pNQILrZ9cOIbTYBp870Q* j; if (!!(((*p) == NIM_NIL))) goto LA3_; j = ((tyObject_GcEnv__j84pNQILrZ9cOIbTYBp870Q*) (env_p1)); add__system_u3291((&(*j).traceStack), p, (*((TNimTypeV2**) ((*p))))); } LA3_: ; popFrame(); } N_LIB_PRIVATE N_NIMCALL(void, eqtrace___temp_u39)(tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw* dest_p0, void* env_p1) { nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.parent, env_p1); nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.up, env_p1); } N_LIB_PRIVATE N_NOINLINE(void, raiseExpectedBlob__temp_u23)(void) { tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw* T1_; nimfr_("raiseExpectedBlob", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); { T1_ = NIM_NIL; T1_ = (tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw*) nimNewObj(sizeof(tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw), NIM_ALIGNOF(tyObject_RlpTypeMismatch__dFD3QFzFLTXpRPX7gIqhDw)); (*T1_).Sup.Sup.Sup.Sup.m_type = (&NTIv2__dFD3QFzFLTXpRPX7gIqhDw_); (*T1_).Sup.Sup.Sup.name = "RlpTypeMismatch"; (*T1_).Sup.Sup.Sup.message = TM__h69aKLv9bAieBdiFzvDngbMw_6; raiseExceptionEx((Exception*)T1_, "RlpTypeMismatch", "raiseExpectedBlob", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim", 14); goto BeforeRet_; }BeforeRet_: ; popFrame(); } static N_INLINE(NI, len__temp_u98)(tyObject_HSlice__EwLGRdWp29coLkI2h8HZj3g x_p0) { NI result; NI TM__h69aKLv9bAieBdiFzvDngbMw_7; NI TM__h69aKLv9bAieBdiFzvDngbMw_8; nimfr_("len", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim"); { if (nimSubInt(x_p0.b, x_p0.a, &TM__h69aKLv9bAieBdiFzvDngbMw_7)) { raiseOverflow(); goto BeforeRet_; }; if (nimAddInt((NI)(TM__h69aKLv9bAieBdiFzvDngbMw_7), ((NI)1), &TM__h69aKLv9bAieBdiFzvDngbMw_8)) { raiseOverflow(); goto BeforeRet_; }; result = ((((NI)0) >= (NI)(TM__h69aKLv9bAieBdiFzvDngbMw_8)) ? ((NI)0) : (NI)(TM__h69aKLv9bAieBdiFzvDngbMw_8)); }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(NimStringV2, toString__temp_u85)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, tyTuple__Ko7uxha9anSfs0suKla39bGw item_p1) { NimStringV2 result; NI T5_; NIM_BOOL* nimErr_; nimfr_("toString", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); { if (!!((item_p1.Field1 == ((tyEnum_RlpNodeType__bD05kxDtfXU6MQHr861tNA)0)))) goto LA3_; raiseExpectedBlob__temp_u23(); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA3_: ; T5_ = (NI)0; T5_ = len__temp_u98(item_p1.Field0); if ((T5_) < ((NI)0) || (T5_) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(T5_, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_; } result = mnewString(((NI) (T5_))); }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(tyTuple__Ko7uxha9anSfs0suKla39bGw, rlpItem__temp_u110)(NU8* input_p0, NI input_p0Len_0, NI start_p1) { tyTuple__Ko7uxha9anSfs0suKla39bGw result; tyObject_ValueError__g37cfbeS6vAfeNwSM6g6XA* T1_; nimfr_("rlpItem", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); { nimZeroMem((void*)(&result), sizeof(tyTuple__Ko7uxha9anSfs0suKla39bGw)); T1_ = NIM_NIL; T1_ = (tyObject_ValueError__g37cfbeS6vAfeNwSM6g6XA*) nimNewObj(sizeof(tyObject_ValueError__g37cfbeS6vAfeNwSM6g6XA), NIM_ALIGNOF(tyObject_ValueError__g37cfbeS6vAfeNwSM6g6XA)); (*T1_).Sup.Sup.Sup.m_type = (&NTIv2__g37cfbeS6vAfeNwSM6g6XA_); (*T1_).Sup.Sup.name = "ValueError"; raiseExceptionEx((Exception*)T1_, "ValueError", "rlpItem", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim", 20); goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(tyTuple__Ko7uxha9anSfs0suKla39bGw, item__temp_u114)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, NI position_p1) { tyTuple__Ko7uxha9anSfs0suKla39bGw result; NIM_BOOL* nimErr_; nimfr_("item", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); result = rlpItem__temp_u110(((self_p0.bytes).p) ? (self_p0.bytes.p->data) : NIM_NIL, self_p0.bytes.len, position_p1); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(tyTuple__Ko7uxha9anSfs0suKla39bGw, item__temp_u299)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0) { tyTuple__Ko7uxha9anSfs0suKla39bGw result; NIM_BOOL* nimErr_; nimfr_("item", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); result = item__temp_u114(self_p0, self_p0.position); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(NimStringV2, toString__temp_u302)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0) { NimStringV2 result; tyTuple__Ko7uxha9anSfs0suKla39bGw T1_; NIM_BOOL* nimErr_; nimfr_("toString", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); T1_ = item__temp_u299(self_p0); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; result = toString__temp_u85(self_p0, T1_); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } N_LIB_PRIVATE N_NIMCALL(void, inspectAux__temp_u305)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* self_p0, NI depth_p1, NIM_BOOL hexOutput_p2, NimStringV2* output_p3) { NimStringV2 str; NIM_BOOL* nimErr_; nimfr_("inspectAux", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); str.len = 0; str.p = NIM_NIL; str = toString__temp_u302((*self_p0)); if (NIM_UNLIKELY(*nimErr_)) goto LA1_; eqsink___stdZassertions_u36((&(*output_p3)), str); eqwasMoved___stdZassertions_u27((&str)); { LA1_:; } { if (str.p && !(str.p->cap & NIM_STRLIT_FLAG)) { deallocShared(str.p); } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); } N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u160)(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ dest_p0) { if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) { alignedDealloc(dest_p0.p, NIM_ALIGNOF(NU8)); } } N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u323)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg* dest_p0) { eqdestroy___temp_u160((*dest_p0).bytes); } N_LIB_PRIVATE N_NIMCALL(NimStringV2, inspect__temp_u311)(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg self_p0, NI indent_p1, NIM_BOOL hexOutput_p2) { NimStringV2 result; tyObject_Rlp__yil5bzFeyxep4RX85fVtDg rlpCopy; NI T2_; NIM_BOOL* nimErr_; nimfr_("inspect", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); {nimErr_ = nimErrorFlag(); result.len = 0; result.p = NIM_NIL; nimZeroMem((void*)(&rlpCopy), sizeof(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg)); eqcopy___temp_u326((&rlpCopy), self_p0); T2_ = self_p0.bytes.len; if ((T2_) < ((NI)0) || (T2_) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(T2_, ((NI)0), ((NI)IL64(9223372036854775807))); goto LA1_; } result = rawNewString(((NI) (T2_))); inspectAux__temp_u305((&rlpCopy), indent_p1, hexOutput_p2, (&result)); if (NIM_UNLIKELY(*nimErr_)) goto LA1_; { LA1_:; } { eqdestroy___temp_u323((&rlpCopy)); } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; popFrame(); return result; } static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2) { NIM_BOOL result; NIM_BOOL T1_; nimfr_("isObjDisplayCheck", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/arc.nim"); T1_ = (NIM_BOOL)0; T1_ = (targetDepth_p1 <= (*source_p0).depth); if (!(T1_)) goto LA2_; T1_ = ((*source_p0).display[targetDepth_p1] == token_p2); LA2_: ; result = T1_; popFrame(); return result; } static N_INLINE(Exception*, nimBorrowCurrentException)(void) { Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim"); result = currException__system_u4436; popFrame(); return result; } static N_INLINE(void, popCurrentException)(void) { eqcopy___stdZtypedthreads_u207(&currException__system_u4436, (*currException__system_u4436).up, NIM_FALSE); } N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { #if 0 void (*volatile inner)(void); inner = PreMainInner; atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000(); (*inner)(); #else atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000(); PreMainInner(); #endif } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { #if 0 void (*volatile inner)(void); PreMain(); inner = NimMainInner; (*inner)(); #else PreMain(); NimMainInner(); #endif } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { { NimStringV2 colontmpD_; tyArray__nHXaesL0DJZHyVS07ARPRA T3_; NimStringV2 T4_; NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim"); nimErr_ = nimErrorFlag(); colontmpD_.len = 0; colontmpD_.p = NIM_NIL; nimZeroMem((void*)(&rlp__temp_u345), sizeof(tyObject_Rlp__yil5bzFeyxep4RX85fVtDg)); rlp__temp_u345.bytes.len = 2; rlp__temp_u345.bytes.p = (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content*) newSeqPayload(2, sizeof(NU8), NIM_ALIGNOF(NU8)); rlp__temp_u345.bytes.p->data[0] = ((NU8)254); rlp__temp_u345.bytes.p->data[1] = ((NU8)0); T4_.len = 0; T4_.p = NIM_NIL; T4_ = inspect__temp_u311(rlp__temp_u345, ((NI)0), NIM_TRUE); if (NIM_UNLIKELY(*nimErr_)) goto LA2_; colontmpD_ = T4_; T3_[0] = colontmpD_; echoBinSafe(T3_, 1); { LA2_:; } { if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) { deallocShared(colontmpD_.p); } eqdestroy___temp_u323((&rlp__temp_u345)); } if (NIM_UNLIKELY(*nimErr_)) goto LA1_; if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObjDisplayCheck(nimBorrowCurrentException()->Sup.m_type, 3, 2128379136)) { *nimErr_ = NIM_FALSE; popCurrentException(); LA8_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2024-05-25T15:11:05
  • Finished 2024-05-25T15:11:05
  • Duration
2.0.4 :+1: OK
2.0.0 :+1: OK
1.6.20 :+1: OK
1.4.8 :-1: FAIL
1.2.18 :+1: OK
1.0.10 :-1: FAIL
#a4f9bc55c :arrow_right: :bug:

Diagnostics

cooldome introduced a bug at 2020-10-28 13:00:49 +0000 on commit #a4f9bc55c with message: ``` ARC now capable of custom extra alignment. Ref, closure and seq support. (#15697) (cherry picked from commit 0956a9953780b0952acb56806fdffa8054fe1070) ``` The bug is in the files: ``` compiler/ccgexprs.nim compiler/liftdestructors.nim lib/core/typeinfo.nim lib/system/arc.nim lib/system/bitmasks.nim lib/system/deepcopy.nim lib/system/memalloc.nim lib/system/orc.nim lib/system/seqs_v2.nim tests/arc/thard_alignment.nim tests/collections/thardalignmentconstraint.nim ``` The bug can be in the commits: (Diagnostics sometimes off-by-one).
Stats
  • GCC 11.4.0
  • Clang 14.0.0
  • NodeJS 20.2
  • Created 2024-05-25T15:10:32Z
  • Comments 3
  • Commands nim c --gc:orc --stacktrace:on --linedir:off -d:nimArcDebug -d:nimArcIds --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim

:robot: Bug found in 26 minutes bisecting 327 commits at 12 commits per second

juancarlospaco commented 1 week ago

!nim c --gc:orc -d:useMalloc

try:
  var a = @[0]
  a[1] = 0
except Defect as err:
  echo err.msg
github-actions[bot] commented 1 week ago
:penguin: Linux bisect by @juancarlospaco (owner)
devel :-1: FAIL

Output

``` 20D:allocSharedImpl(malloc.nim:34)by0x10F51C:system::alignedAlloc(range09223372036854775807,range09223372036854775807)(memalloc.nim:331)by0x11004C:newSeqPayloadUninit(seqs_v2.nim:55)by0x110131:prepareSeqAddUninit(seqs_v2.nim:106)by0x110677:system::setLen(var>,range09223372036854775807)(seqs_v2.nim:178)by0x110701:system::newSeq(var>,range09223372036854775807)(seqs_v2.nim:185)by0x11079E:system::newSeq(range09223372036854775807)(system.nim:635)88bytesin1blocksarestillreachableinlossrecord4of7at0x484DA83:calloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B248:system::alloc0Impl(range09223372036854775807)(malloc.nim:11)by0x10B33C:system::allocShared0Impl(range09223372036854775807)(malloc.nim:37)by0x10F255:system::alignedAlloc0(range09223372036854775807,range09223372036854775807)(memalloc.nim:351)by0x10BD8E:nimNewObj(arc.nim:96)by0x112512:_ZN6system8sysFatalE8typeDescIN10exceptions11IndexDefectEE4sinkI6stringE(fatal.nim:53)by0x112512:raiseIndexError2(chcks.nim:28)by0x114637:NimMainModule(temp.nim:3)by0x1148AE:NimMainInner(excpt.nim:466)by0x1148C5:NimMain(excpt.nim:477)2,009bytesin1blocksarestillreachableinlossrecord5of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B1FB:system::allocImpl(range09223372036854775807)(malloc.nim:5)by0x10B20D:allocSharedImpl(malloc.nim:34)by0x10B398:rawNewString(strs_v2.nim:39)by0x112F6B:signalHandler(excpt.nim:651)by0x48A951F:???(in/usr/lib/x86_64-linux-gnu/libc.so.6)by0x4853A6D:strstr(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10CC66:system::registerCycle(ptr,ptr)(orc.nim:440)by0x10CE39:system::rememberCycle(bool,ptr,ptr)(orc.nim:496)4,096bytesin1blocksarestillreachableinlossrecord6of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x48E5BA3:_IO_file_doallocate(filedoalloc.c:101)by0x48F4CDF:_IO_doallocbuf(genops.c:347)by0x48F3F5F:_IO_file_overflow@@GLIBC_2.2.5(fileops.c:744)by0x48F26D4:_IO_new_file_xsputn(fileops.c:1243)by0x48F26D4:_IO_file_xsputn@@GLIBC_2.2.5(fileops.c:1196)by0x48E6FD6:fwrite(iofwrite.c:39)by0x113772:echoBinSafe(system.nim:2897)by0x11481A:NimMainModule(temp.nim:5)by0x1148AE:NimMainInner(excpt.nim:466)16,384bytesin1blocksarestillreachableinlossrecord7of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B1FB:system::allocImpl(range09223372036854775807)(malloc.nim:5)by0x10B20D:allocSharedImpl(malloc.nim:34)by0x10C2C1:system::init(var>>,int)(cellseqs_v2.nim:37)by0x10CCE0:system::registerCycle(ptr,ptr)(orc.nim:433)by0x10CE39:system::rememberCycle(bool,ptr,ptr)(orc.nim:496)by0x113918:nimDecRefIsLastCyclicDyn(orc.nim:507)by0x113918:system::eqdestroy_(ref)(temp.nim:4)by0x114822:NimMainModule(temp.nim:4)by0x1148AE:NimMainInner(excpt.nim:466)LEAKSUMMARY:definitelylost:0bytesin0blocksindirectlylost:0bytesin0blockspossiblylost:0bytesin0blocksstillreachable:22,679bytesin7blockssuppressed:0bytesin0blocksERRORSUMMARY:1errorsfrom1contexts(suppressed:0from0)1errorsincontext1of1:Invalidreadofsize1at0x4853A6E:strstr(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10CC66:system::registerCycle(ptr,ptr)(orc.nim:440)by0x10CE39:system::rememberCycle(bool,ptr,ptr)(orc.nim:496)by0x113918:nimDecRefIsLastCyclicDyn(orc.nim:507)by0x113918:system::eqdestroy_(ref)(temp.nim:4)by0x114822:NimMainModule(temp.nim:4)by0x1148AE:NimMainInner(excpt.nim:466)by0x1148C5:NimMain(excpt.nim:477)by0x1148EB:main(excpt.nim:485)Address0x0isnotstack'd,malloc'dor(recently)free'dERRORSUMMARY:1errorsfrom1contexts(suppressed:0from0)Segmentationfault(coredumped) ```

IR

Compiled filesize 438.58 Kb (449,104 bytes) ```cpp #define FX_0 "/home/runner/.choosenim/toolchains/nim-#devel/config/nim.cfg" #define FX_1 "/home/runner/.choosenim/toolchains/nim-#devel/config/config.nims" #define FX_2 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system.nim" #define FX_3 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/basic_types.nim" #define FX_4 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/compilation.nim" #define FX_5 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arithmetics.nim" #define FX_6 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/comparisons.nim" #define FX_7 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/inclrtl.nim" #define FX_8 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/exceptions.nim" #define FX_9 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/setops.nim" #define FX_10 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/since.nim" #define FX_11 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/ctypes.nim" #define FX_12 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/rawquits.nim" #define FX_13 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/memalloc.nim" #define FX_14 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators_1.nim" #define FX_15 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/fatal.nim" #define FX_16 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim" #define FX_17 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/miscdollars.nim" #define FX_18 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/digitsutils.nim" #define FX_19 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim" #define FX_20 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/gc_interface.nim" #define FX_21 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/coro_detection.nim" #define FX_22 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/dollars.nim" #define FX_23 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/formatfloat.nim" #define FX_24 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/dragonbox.nim" #define FX_25 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/schubfach.nim" #define FX_26 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/objectdollar.nim" #define FX_27 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/indices.nim" #define FX_28 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/nimscript.nim" #define FX_29 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/widestrs.nim" #define FX_30 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/syncio.nim" #define FX_31 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #define FX_32 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/hti.nim" #define FX_33 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/sysatomics.nim" #define FX_34 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/bitmasks.nim" #define FX_35 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/ansi_c.nim" #define FX_36 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/memory.nim" #define FX_37 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/syslocks.nim" #define FX_38 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/threadlocalstorage.nim" #define FX_39 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/threadtypes.nim" #define FX_40 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/strs_v2.nim" #define FX_41 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/seqs_v2.nim" #define FX_42 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arc.nim" #define FX_43 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/cellsets.nim" #define FX_44 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/orc.nim" #define FX_45 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/cellseqs_v2.nim" #define FX_46 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/threadids.nim" #define FX_47 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/threadimpl.nim" #define FX_48 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/typedthreads.nim" #define FX_49 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/excpt.nim" #define FX_50 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/stacktraces.nim" #define FX_51 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/chcks.nim" #define FX_52 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/indexerrors.nim" #define FX_53 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/integerops.nim" #define FX_54 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/dyncalls.nim" #define FX_55 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/countbits_impl.nim" #define FX_56 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/bitops_utils.nim" #define FX_57 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/sets.nim" #define FX_58 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/mmdisp.nim" #define FX_59 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/mm/malloc.nim" #define FX_60 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/strmantle.nim" #define FX_61 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/assign.nim" #define FX_62 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/seqs_v2_reimpl.nim" #define FX_63 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/channels_builtin.nim" #define FX_64 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/repr_v2.nim" #define FX_65 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/deepcopy.nim" #define FX_66 "/home/runner/.choosenim/toolchains/nim-#devel/lib/nimhcr.nim" #define NIM_INTBITS 64 #include "nimbase.h" #define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); #define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); #define nimln_(n) \ FR_.line = n; #define nimlf_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ; typedef struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content; typedef struct tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA; typedef struct tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 { void* destructor; NI size; NI16 align; NI16 depth; NU32* display; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; void* vTable[SEQ_DECL_SIZE]; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ { NI len; tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content* p; }; struct Exception { RootObj Sup; Exception* parent; NCSTRING name; NimStringV2 message; tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ trace; Exception* up; }; struct tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; }; struct tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg { NCSTRING procname; NI line; NCSTRING filename; }; struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content { NI cap; tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg data[SEQ_DECL_SIZE]; }; N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3seqI3intE)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0); static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, _ZN6system21callDepthLimitReachedE)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool)(Exception** dest_p0, Exception* src_p1, NIM_BOOL cyclic_p2); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3refIN6system6DefectEE)(tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA* dest_p0); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern NIM_THREADVAR TFrame* framePtr__system_u2652; extern NIM_THREADVAR Exception* currException__system_u4409; extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4744; #line 570 FX_49 static N_INLINE(void, nimFrame)(TFrame* s_p0) { #line 571 FX_49 { if (!(framePtr__system_u2652 == ((TFrame*) NIM_NIL))) goto LA3_; #line 572 FX_49 (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { #line 575 FX_49 (*s_p0).calldepth = (NI16)((*framePtr__system_u2652).calldepth + ((NI16)1)); } LA1_: ; #line 577 FX_49 (*s_p0).prev = framePtr__system_u2652; #line 578 FX_49 framePtr__system_u2652 = s_p0; #line 579 FX_49 { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; _ZN6system21callDepthLimitReachedE(); } LA8_: ; } #line 118 FX_49 static N_INLINE(void, popFrame)(void) { #line 119 FX_49 framePtr__system_u2652 = (*framePtr__system_u2652).prev;} #line 261 FX_42 static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2) { NIM_BOOL result; NIM_BOOL T1_; nimfr_("isObjDisplayCheck", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arc.nim"); #line 262 FX_42 T1_ = (NIM_BOOL)0; T1_ = (targetDepth_p1 <= (*source_p0).depth); if (!(T1_)) goto LA2_; T1_ = ((*source_p0).display[targetDepth_p1] == token_p2);LA2_: ; result = T1_; popFrame(); return result;} #line 2278 FX_2 static N_INLINE(Exception*, nimBorrowCurrentException)(void) { Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system.nim"); #line 2281 FX_2 result = currException__system_u4409; popFrame(); return result;} #line 2274 FX_2 static N_INLINE(Exception*, getCurrentException)(void) { Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system.nim"); result = NIM_NIL; #line 287 FX_48 _ZN6system7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&result, currException__system_u4409, NIM_FALSE); popFrame(); return result;} #line 157 FX_49 static N_INLINE(void, popCurrentException)(void) { #line 287 FX_48 _ZN6system7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&currException__system_u4409, (*currException__system_u4409).up, NIM_FALSE); } #line 444 FX_49 static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; #line 445 FX_49 result = (&nimInErrorMode__system_u4744); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { #if 0 void (*volatile inner)(void); inner = PreMainInner; atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000(); (*inner)(); #else atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000(); PreMainInner(); #endif } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { #if 0 void (*volatile inner)(void); PreMain(); inner = NimMainInner; (*inner)(); #else PreMain(); NimMainInner(); #endif } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 FX_31 a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI)0); #line 3 FX_31 if (((NI)1) < 0 || ((NI)1) >= a__temp_u5.len){ raiseIndexError2(((NI)1),a__temp_u5.len-1); goto LA1_; } a__temp_u5.p->data[((NI)1)] = ((NI)0); #line 2 FX_31 _ZN6system10eqdestroy_E3seqI3intE(a__temp_u5); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObjDisplayCheck(nimBorrowCurrentException()->Sup.m_type, 2, 3308231424)) { #line 4 FX_31 tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 5 FX_31 T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA*) (T6_)); #line 5 FX_31 T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 FX_31 _ZN6system10eqdestroy_E3refIN6system6DefectEE(err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T14:28:56
  • Finished 2024-06-15T14:28:59
  • Duration 3 minutes

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
stable :-1: FAIL

Output

``` ystem::alignedAlloc0(range09223372036854775807,range09223372036854775807)(memalloc.nim:351)by0x1122DF:newSeqPayload(seqs_v2.nim:44)by0x1123C1:prepareSeqAdd(seqs_v2.nim:62)by0x112907:setLen::setLen(var>,range09223372036854775807)(seqs_v2.nim:133)by0x112991:newSeq::newSeq(var>,range09223372036854775807)(seqs_v2.nim:140)by0x112A2E:newSeq::newSeq(range09223372036854775807)(system.nim:631)88bytesin1blocksarestillreachableinlossrecord4of7at0x484DA83:calloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B248:system::alloc0Impl(range09223372036854775807)(malloc.nim:11)by0x10B2BE:system::allocShared0Impl(range09223372036854775807)(malloc.nim:37)by0x111DB7:system::alignedAlloc0(range09223372036854775807,range09223372036854775807)(memalloc.nim:351)by0x111F50:nimNewObj(arc.nim:81)by0x10B6E0:_ZN8sysFatal8sysFatalE8typeDescIN10exceptions11IndexDefectEE4sinkI6stringE(fatal.nim:53)by0x10B6E0:raiseIndexError2(chcks.nim:28)by0x114598:NimMainModule(temp.nim:3)by0x11480F:NimMainInner(excpt.nim:445)by0x114826:NimMain(excpt.nim:456)2,009bytesin1blocksarestillreachableinlossrecord5of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B1FB:system::allocImpl(range09223372036854775807)(malloc.nim:5)by0x10B20D:allocSharedImpl(malloc.nim:34)by0x10B37B:rawNewString(strs_v2.nim:39)by0x112F7C:signalHandler(excpt.nim:630)by0x48A951F:???(in/usr/lib/x86_64-linux-gnu/libc.so.6)by0x4853A6D:strstr(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10C507:system::registerCycle(ptr,ptr)(orc.nim:419)by0x10C6DA:system::rememberCycle(bool,ptr,ptr)(orc.nim:475)4,096bytesin1blocksarestillreachableinlossrecord6of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x48E5BA3:_IO_file_doallocate(filedoalloc.c:101)by0x48F4CDF:_IO_doallocbuf(genops.c:347)by0x48F3F5F:_IO_file_overflow@@GLIBC_2.2.5(fileops.c:744)by0x48F26D4:_IO_new_file_xsputn(fileops.c:1243)by0x48F26D4:_IO_file_xsputn@@GLIBC_2.2.5(fileops.c:1196)by0x48E6FD6:fwrite(iofwrite.c:39)by0x1136BB:echoBinSafe(system.nim:2758)by0x11477B:NimMainModule(temp.nim:5)by0x11480F:NimMainInner(excpt.nim:445)16,384bytesin1blocksarestillreachableinlossrecord7of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B1FB:system::allocImpl(range09223372036854775807)(malloc.nim:5)by0x10B20D:allocSharedImpl(malloc.nim:34)by0x112EEB:init::init(var>>,int)(cellseqs_v2.nim:37)by0x10C581:system::registerCycle(ptr,ptr)(orc.nim:412)by0x10C6DA:system::rememberCycle(bool,ptr,ptr)(orc.nim:475)by0x11387E:nimDecRefIsLastCyclicDyn(orc.nim:486)by0x11387E:system::eqdestroy_(ref)(temp.nim:4)by0x114783:NimMainModule(temp.nim:4)by0x11480F:NimMainInner(excpt.nim:445)LEAKSUMMARY:definitelylost:0bytesin0blocksindirectlylost:0bytesin0blockspossiblylost:0bytesin0blocksstillreachable:22,679bytesin7blockssuppressed:0bytesin0blocksERRORSUMMARY:1errorsfrom1contexts(suppressed:0from0)1errorsincontext1of1:Invalidreadofsize1at0x4853A6E:strstr(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10C507:system::registerCycle(ptr,ptr)(orc.nim:419)by0x10C6DA:system::rememberCycle(bool,ptr,ptr)(orc.nim:475)by0x11387E:nimDecRefIsLastCyclicDyn(orc.nim:486)by0x11387E:system::eqdestroy_(ref)(temp.nim:4)by0x114783:NimMainModule(temp.nim:4)by0x11480F:NimMainInner(excpt.nim:445)by0x114826:NimMain(excpt.nim:456)by0x11484C:main(excpt.nim:464)Address0x0isnotstack'd,malloc'dor(recently)free'dERRORSUMMARY:1errorsfrom1contexts(suppressed:0from0)Segmentationfault(coredumped) ```

IR

Compiled filesize 395.00 Kb (404,480 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); #define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); #define nimln_(n) \ FR_.line = n; #define nimlf_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ; typedef struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content; typedef struct tyObject_Defect__4irTbIOnlxhyYExShRxlog tyObject_Defect__4irTbIOnlxhyYExShRxlog; typedef struct tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 { void* destructor; NI size; NI16 align; NI16 depth; NU32* display; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ { NI len; tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content* p; }; struct Exception { RootObj Sup; Exception* parent; NCSTRING name; NimStringV2 message; tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ trace; Exception* up; }; struct tyObject_Defect__4irTbIOnlxhyYExShRxlog { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; }; struct tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ { NCSTRING procname; NI line; NCSTRING filename; }; struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content { NI cap; tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ data[SEQ_DECL_SIZE]; }; N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1); N_LIB_PRIVATE N_NIMCALL(void, _ZN3at_10eqdestroy_E3seqI3intE)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0); static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, _ZN6system21callDepthLimitReachedE)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, _ZN12newException7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool)(Exception** dest_p0, Exception* src_p1, NIM_BOOL cyclic_p2); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3refIN6system6DefectEE)(tyObject_Defect__4irTbIOnlxhyYExShRxlog* dest_p0); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern NIM_THREADVAR TFrame* framePtr__system_u4431; extern NIM_THREADVAR Exception* currException__system_u4433; extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4814; #line 549 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(void, nimFrame)(TFrame* s_p0) { #line 550 { if (!(framePtr__system_u4431 == ((TFrame*) NIM_NIL))) goto LA3_; #line 551 (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { #line 554 (*s_p0).calldepth = (NI16)((*framePtr__system_u4431).calldepth + ((NI16)1)); } LA1_: ; #line 556 (*s_p0).prev = framePtr__system_u4431; #line 557 framePtr__system_u4431 = s_p0; #line 558 { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; _ZN6system21callDepthLimitReachedE(); } LA8_: ; } #line 99 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(void, popFrame)(void) { #line 100 framePtr__system_u4431 = (*framePtr__system_u4431).prev;} #line 237 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/arc.nim" static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2) { NIM_BOOL result; NIM_BOOL T1_; nimfr_("isObjDisplayCheck", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/arc.nim"); #line 238 T1_ = (NIM_BOOL)0; T1_ = (targetDepth_p1 <= (*source_p0).depth); if (!(T1_)) goto LA2_; T1_ = ((*source_p0).display[targetDepth_p1] == token_p2);LA2_: ; result = T1_; popFrame(); return result;} #line 2209 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim" static N_INLINE(Exception*, nimBorrowCurrentException)(void) { Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim"); #line 2212 result = currException__system_u4433; popFrame(); return result;} #line 2205 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim" static N_INLINE(Exception*, getCurrentException)(void) { Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim"); result = NIM_NIL; #line 247 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/std/typedthreads.nim" _ZN12newException7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&result, currException__system_u4433, NIM_FALSE); popFrame(); return result;} #line 137 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(void, popCurrentException)(void) { #line 247 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/std/typedthreads.nim" _ZN12newException7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&currException__system_u4433, (*currException__system_u4433).up, NIM_FALSE); } #line 423 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; #line 424 result = (&nimInErrorMode__system_u4814); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { #if 0 void (*volatile inner)(void); inner = PreMainInner; atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000(); (*inner)(); #else atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000(); PreMainInner(); #endif } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { #if 0 void (*volatile inner)(void); PreMain(); inner = NimMainInner; (*inner)(); #else PreMain(); NimMainInner(); #endif } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI)0); #line 3 if (((NI)1) < 0 || ((NI)1) >= a__temp_u5.len){ raiseIndexError2(((NI)1),a__temp_u5.len-1); goto LA1_; } a__temp_u5.p->data[((NI)1)] = ((NI)0); #line 2 _ZN3at_10eqdestroy_E3seqI3intE(a__temp_u5); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObjDisplayCheck(nimBorrowCurrentException()->Sup.m_type, 2, 718498816)) { #line 4 tyObject_Defect__4irTbIOnlxhyYExShRxlog* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 5 T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__4irTbIOnlxhyYExShRxlog*) (T6_)); #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 _ZN6system10eqdestroy_E3refIN6system6DefectEE(err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T14:29:00
  • Finished 2024-06-15T14:29:01
  • Duration 1 minutes

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
2.0.4 :-1: FAIL

Output

``` ystem::alignedAlloc0(range09223372036854775807,range09223372036854775807)(memalloc.nim:351)by0x1122DF:newSeqPayload(seqs_v2.nim:44)by0x1123C1:prepareSeqAdd(seqs_v2.nim:62)by0x112907:setLen::setLen(var>,range09223372036854775807)(seqs_v2.nim:133)by0x112991:newSeq::newSeq(var>,range09223372036854775807)(seqs_v2.nim:140)by0x112A2E:newSeq::newSeq(range09223372036854775807)(system.nim:631)88bytesin1blocksarestillreachableinlossrecord4of7at0x484DA83:calloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B248:system::alloc0Impl(range09223372036854775807)(malloc.nim:11)by0x10B2BE:system::allocShared0Impl(range09223372036854775807)(malloc.nim:37)by0x111DB7:system::alignedAlloc0(range09223372036854775807,range09223372036854775807)(memalloc.nim:351)by0x111F50:nimNewObj(arc.nim:81)by0x10B6E0:_ZN8sysFatal8sysFatalE8typeDescIN10exceptions11IndexDefectEE4sinkI6stringE(fatal.nim:53)by0x10B6E0:raiseIndexError2(chcks.nim:28)by0x114598:NimMainModule(temp.nim:3)by0x11480F:NimMainInner(excpt.nim:445)by0x114826:NimMain(excpt.nim:456)2,009bytesin1blocksarestillreachableinlossrecord5of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B1FB:system::allocImpl(range09223372036854775807)(malloc.nim:5)by0x10B20D:allocSharedImpl(malloc.nim:34)by0x10B37B:rawNewString(strs_v2.nim:39)by0x112F7C:signalHandler(excpt.nim:630)by0x48A951F:???(in/usr/lib/x86_64-linux-gnu/libc.so.6)by0x4853A6D:strstr(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10C507:system::registerCycle(ptr,ptr)(orc.nim:419)by0x10C6DA:system::rememberCycle(bool,ptr,ptr)(orc.nim:475)4,096bytesin1blocksarestillreachableinlossrecord6of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x48E5BA3:_IO_file_doallocate(filedoalloc.c:101)by0x48F4CDF:_IO_doallocbuf(genops.c:347)by0x48F3F5F:_IO_file_overflow@@GLIBC_2.2.5(fileops.c:744)by0x48F26D4:_IO_new_file_xsputn(fileops.c:1243)by0x48F26D4:_IO_file_xsputn@@GLIBC_2.2.5(fileops.c:1196)by0x48E6FD6:fwrite(iofwrite.c:39)by0x1136BB:echoBinSafe(system.nim:2758)by0x11477B:NimMainModule(temp.nim:5)by0x11480F:NimMainInner(excpt.nim:445)16,384bytesin1blocksarestillreachableinlossrecord7of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B1FB:system::allocImpl(range09223372036854775807)(malloc.nim:5)by0x10B20D:allocSharedImpl(malloc.nim:34)by0x112EEB:init::init(var>>,int)(cellseqs_v2.nim:37)by0x10C581:system::registerCycle(ptr,ptr)(orc.nim:412)by0x10C6DA:system::rememberCycle(bool,ptr,ptr)(orc.nim:475)by0x11387E:nimDecRefIsLastCyclicDyn(orc.nim:486)by0x11387E:system::eqdestroy_(ref)(temp.nim:4)by0x114783:NimMainModule(temp.nim:4)by0x11480F:NimMainInner(excpt.nim:445)LEAKSUMMARY:definitelylost:0bytesin0blocksindirectlylost:0bytesin0blockspossiblylost:0bytesin0blocksstillreachable:22,679bytesin7blockssuppressed:0bytesin0blocksERRORSUMMARY:1errorsfrom1contexts(suppressed:0from0)1errorsincontext1of1:Invalidreadofsize1at0x4853A6E:strstr(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10C507:system::registerCycle(ptr,ptr)(orc.nim:419)by0x10C6DA:system::rememberCycle(bool,ptr,ptr)(orc.nim:475)by0x11387E:nimDecRefIsLastCyclicDyn(orc.nim:486)by0x11387E:system::eqdestroy_(ref)(temp.nim:4)by0x114783:NimMainModule(temp.nim:4)by0x11480F:NimMainInner(excpt.nim:445)by0x114826:NimMain(excpt.nim:456)by0x11484C:main(excpt.nim:464)Address0x0isnotstack'd,malloc'dor(recently)free'dERRORSUMMARY:1errorsfrom1contexts(suppressed:0from0)Segmentationfault(coredumped) ```
2.0.0 :-1: FAIL

Output

``` /libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B229:alloc0Impl__system_u1763(malloc.nim:11)by0x10B23B:allocShared0Impl__system_u1776(malloc.nim:37)by0x11056F:alignedAlloc0__system_u1947(memalloc.nim:351)by0x112754:nimNewObj(arc.nim:81)by0x10B77A:sysFatal__system_u5146(fatal.nim:53)by0x10B77A:raiseIndexError2(chcks.nim:28)by0x11444A:NimMainModule(temp.nim:3)by0x1146C1:NimMainInner(excpt.nim:445)by0x1146D8:NimMain(excpt.nim:456)2,009bytesin1blocksarestillreachableinlossrecord5of7at0x484DA83:calloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B229:alloc0Impl__system_u1763(malloc.nim:11)by0x10B23B:allocShared0Impl__system_u1776(malloc.nim:37)by0x10B3D1:rawNewString(strs_v2.nim:111)by0x112E13:signalHandler(excpt.nim:630)by0x48A951F:???(in/usr/lib/x86_64-linux-gnu/libc.so.6)by0x4853A6D:strstr(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10C5A1:registerCycle__system_u3770(orc.nim:419)by0x10C774:rememberCycle__system_u3810(orc.nim:475)4,096bytesin1blocksarestillreachableinlossrecord6of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x48E5BA3:_IO_file_doallocate(filedoalloc.c:101)by0x48F4CDF:_IO_doallocbuf(genops.c:347)by0x48F3F5F:_IO_file_overflow@@GLIBC_2.2.5(fileops.c:744)by0x48F26D4:_IO_new_file_xsputn(fileops.c:1243)by0x48F26D4:_IO_file_xsputn@@GLIBC_2.2.5(fileops.c:1196)by0x48E6FD6:fwrite(iofwrite.c:39)by0x113552:echoBinSafe(system.nim:2758)by0x11462D:NimMainModule(temp.nim:5)by0x1146C1:NimMainInner(excpt.nim:445)16,384bytesin1blocksarestillreachableinlossrecord7of7at0x4848899:malloc(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10B24D:allocImpl__system_u1761(malloc.nim:5)by0x10B25F:allocSharedImpl(malloc.nim:34)by0x112D82:init__system_u3629(cellseqs_v2.nim:37)by0x10C61B:registerCycle__system_u3770(orc.nim:412)by0x10C774:rememberCycle__system_u3810(orc.nim:475)by0x113715:nimDecRefIsLastCyclicDyn(orc.nim:486)by0x113715:eqdestroy___temp_u171(temp.nim:4)by0x114635:NimMainModule(temp.nim:4)by0x1146C1:NimMainInner(excpt.nim:445)LEAKSUMMARY:definitelylost:0bytesin0blocksindirectlylost:0bytesin0blockspossiblylost:0bytesin0blocksstillreachable:22,679bytesin7blockssuppressed:0bytesin0blocksERRORSUMMARY:1errorsfrom1contexts(suppressed:0from0)1errorsincontext1of1:Invalidreadofsize1at0x4853A6E:strstr(in/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)by0x10C5A1:registerCycle__system_u3770(orc.nim:419)by0x10C774:rememberCycle__system_u3810(orc.nim:475)by0x113715:nimDecRefIsLastCyclicDyn(orc.nim:486)by0x113715:eqdestroy___temp_u171(temp.nim:4)by0x114635:NimMainModule(temp.nim:4)by0x1146C1:NimMainInner(excpt.nim:445)by0x1146D8:NimMain(excpt.nim:456)by0x1146FE:main(excpt.nim:464)Address0x0isnotstack'd,malloc'dor(recently)free'dERRORSUMMARY:1errorsfrom1contexts(suppressed:0from0)Segmentationfault(coredumped) ```
1.6.20 :+1: OK

Output

``` index1notin0..0 ```
1.4.8 :-1: FAIL

Output

``` Error:Commandfailed:nimc--gc:orc-d:useMalloc-d:nimArcDebug-d:nimArcIds-d:nimAllocPagesViaMalloc-d:useSysAssert-d:useGcAssert-d:nimLeakDetector--debugger:native--debuginfo:on-d:nimDebug-d:nimDebugDlOpen-d:ssl-d:nimDisableCertificateValidation--forceBuild:on--colors:off--verbosity:0--hints:off--lineTrace:off--nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield--out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim&&valgrind/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp/home/runner/.choosenim/toolchains/nim-1.4.8/lib/system/bitmasks.nim(13,3)Error:redefinitionof'PageShift';previousdeclarationhere:/home/runner/.choosenim/toolchains/nim-1.4.8/lib/system/bitmasks.nim(13,3) ```
1.2.18 :-1: FAIL

Output

``` Error:Commandfailed:nimc--gc:orc-d:useMalloc-d:nimArcDebug-d:nimArcIds-d:nimAllocPagesViaMalloc-d:useSysAssert-d:useGcAssert-d:nimLeakDetector--debugger:native--debuginfo:on-d:nimDebug-d:nimDebugDlOpen-d:ssl-d:nimDisableCertificateValidation--forceBuild:on--colors:off--verbosity:0--hints:off--lineTrace:off--nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield--out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim&&valgrind/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim(2,11)template/genericinstantiationof`setLen`fromhere/home/runner/.choosenim/toolchains/nim-1.2.18/lib/system/seqs_v2.nim(116,13)template/genericinstantiationof`shrink`fromhere/home/runner/.choosenim/toolchains/nim-1.2.18/lib/system/seqs_v2.nim(78,15)template/genericinstantiationof`sysAssert`fromhere/home/runner/.choosenim/toolchains/nim-1.2.18/lib/system.nim(1173,7)Error:undeclaredidentifier:'cstderr' ```
1.0.10 :-1: FAIL

Output

``` Error:Commandfailed:nimc--gc:orc-d:useMalloc-d:nimArcDebug-d:nimArcIds-d:nimAllocPagesViaMalloc-d:useSysAssert-d:useGcAssert-d:nimLeakDetector--debugger:native--debuginfo:on-d:nimDebug-d:nimDebugDlOpen-d:ssl-d:nimDisableCertificateValidation--forceBuild:on--colors:off--verbosity:0--hints:off--lineTrace:off--nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield--out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim&&valgrind/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/tempcommandline(1,2)Error:'none','boehm'or'refc'expected,but'orc'found ```
#cdb136f58 :arrow_right: :bug:

Diagnostics

ringabout introduced a bug at 2022-11-09 03:39:42 +0800 on commit #cdb136f58 with message: ``` arc/orc no longer needs type names by default; with `nimTypeNames` it gets nicer names (#20789) Co-authored-by: Araq ``` The bug is in the files: ``` compiler/ccgtypes.nim ``` The bug can be in the commits: (Diagnostics sometimes off-by-one).
Stats
  • GCC 11.4.0
  • Clang 14.0.0
  • NodeJS 20.3
  • Created 2024-06-15T14:28:19Z
  • Comments 3
  • Commands nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp

:robot: Bug found in 42 minutes bisecting 2265 commits at 53 commits per second

juancarlospaco commented 1 week ago

!nim c --gc:orc -d:useMalloc

try:
  var a = @[0]
  a[1] = 0
except Defect as err:
  echo err.msg
github-actions[bot] commented 1 week ago
:penguin: Linux bisect by @juancarlospaco (owner)
devel :-1: FAIL

Output

``` Error: Command failed: nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp command line(1, 2) Warning: `gc:option` is deprecated; use `mm:option` instead [Deprecated] command line(1, 2) Warning: `gc:option` is deprecated; use `mm:option` instead [Deprecated] [added root] (null) 0 root index: 1; RC: 0; color: 0; thread: 2731 Invalid read of size 1 at 0x4853A6E: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10CC66: system::registerCycle(ptr, ptr) (orc.nim:440) by 0x10CE39: system::rememberCycle(bool, ptr, ptr) (orc.nim:496) by 0x113918: nimDecRefIsLastCyclicDyn (orc.nim:507) by 0x113918: system::eqdestroy_(ref) (temp.nim:4) by 0x114822: NimMainModule (temp.nim:4) by 0x1148AE: NimMainInner (excpt.nim:466) by 0x1148C5: NimMain (excpt.nim:477) by 0x1148EB: main (excpt.nim:485) Address 0x0 is not stack'd, malloc'd or (recently) free'd Traceback (most recent call last) /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim temp /home/runner/.choosenim/toolchains/nim-#devel/lib/system/orc.nim nimDecRefIsLastCyclicDyn /home/runner/.choosenim/toolchains/nim-#devel/lib/system/orc.nim rememberCycle /home/runner/.choosenim/toolchains/nim-#devel/lib/system/orc.nim registerCycle SIGSEGV: Illegal storage access. (Attempt to read from nil?) 16 bytes in 1 blocks are still reachable in loss record 1 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B248: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10B33C: system::allocShared0Impl(range09223372036854775807) (malloc.nim:37) by 0x10F255: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:351) by 0x1135B1: newSeqPayload (seqs_v2.nim:46) by 0x114595: NimMainModule (temp.nim:2) by 0x1148AE: NimMainInner (excpt.nim:466) by 0x1148C5: NimMain (excpt.nim:477) by 0x1148EB: main (excpt.nim:485) 30 bytes in 1 blocks are still reachable in loss record 2 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x10B398: rawNewString (strs_v2.nim:39) by 0x11229D: raiseIndexError2 (indexerrors.nim:9) by 0x114637: NimMainModule (temp.nim:3) by 0x1148AE: NimMainInner (excpt.nim:466) by 0x1148C5: NimMain (excpt.nim:477) by 0x1148EB: main (excpt.nim:485) 56 bytes in 1 blocks are still reachable in loss record 3 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x10F51C: system::alignedAlloc(range09223372036854775807, range09223372036854775807) (memalloc.nim:331) by 0x11004C: newSeqPayloadUninit (seqs_v2.nim:55) by 0x110131: prepareSeqAddUninit (seqs_v2.nim:106) by 0x110677: system::setLen(var >, range09223372036854775807) (seqs_v2.nim:178) by 0x110701: system::newSeq(var >, range09223372036854775807) (seqs_v2.nim:185) by 0x11079E: system::newSeq(range09223372036854775807) (system.nim:635) 88 bytes in 1 blocks are still reachable in loss record 4 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B248: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10B33C: system::allocShared0Impl(range09223372036854775807) (malloc.nim:37) by 0x10F255: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:351) by 0x10BD8E: nimNewObj (arc.nim:96) by 0x112512: _ZN6system8sysFatalE8typeDescIN10exceptions11IndexDefectEE4sinkI6stringE (fatal.nim:53) by 0x112512: raiseIndexError2 (chcks.nim:28) by 0x114637: NimMainModule (temp.nim:3) by 0x1148AE: NimMainInner (excpt.nim:466) by 0x1148C5: NimMain (excpt.nim:477) 2,009 bytes in 1 blocks are still reachable in loss record 5 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x10B398: rawNewString (strs_v2.nim:39) by 0x112F6B: signalHandler (excpt.nim:651) by 0x48A951F: ??? (in /usr/lib/x86_64-linux-gnu/libc.so.6) by 0x4853A6D: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10CC66: system::registerCycle(ptr, ptr) (orc.nim:440) by 0x10CE39: system::rememberCycle(bool, ptr, ptr) (orc.nim:496) 4,096 bytes in 1 blocks are still reachable in loss record 6 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x48E5BA3: _IO_file_doallocate (filedoalloc.c:101) by 0x48F4CDF: _IO_doallocbuf (genops.c:347) by 0x48F3F5F: _IO_file_overflow@@GLIBC_2.2.5 (fileops.c:744) by 0x48F26D4: _IO_new_file_xsputn (fileops.c:1243) by 0x48F26D4: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1196) by 0x48E6FD6: fwrite (iofwrite.c:39) by 0x113772: echoBinSafe (system.nim:2897) by 0x11481A: NimMainModule (temp.nim:5) by 0x1148AE: NimMainInner (excpt.nim:466) 16,384 bytes in 1 blocks are still reachable in loss record 7 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x10C2C1: system::init(var > >, int) (cellseqs_v2.nim:37) by 0x10CCE0: system::registerCycle(ptr, ptr) (orc.nim:433) by 0x10CE39: system::rememberCycle(bool, ptr, ptr) (orc.nim:496) by 0x113918: nimDecRefIsLastCyclicDyn (orc.nim:507) by 0x113918: system::eqdestroy_(ref) (temp.nim:4) by 0x114822: NimMainModule (temp.nim:4) by 0x1148AE: NimMainInner (excpt.nim:466) ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) 1 errors in context 1 of 8: Invalid read of size 1 at 0x4853A6E: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10CC66: system::registerCycle(ptr, ptr) (orc.nim:440) by 0x10CE39: system::rememberCycle(bool, ptr, ptr) (orc.nim:496) by 0x113918: nimDecRefIsLastCyclicDyn (orc.nim:507) by 0x113918: system::eqdestroy_(ref) (temp.nim:4) by 0x114822: NimMainModule (temp.nim:4) by 0x1148AE: NimMainInner (excpt.nim:466) by 0x1148C5: NimMain (excpt.nim:477) by 0x1148EB: main (excpt.nim:485) Address 0x0 is not stack'd, malloc'd or (recently) free'd ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) Segmentation fault (core dumped) ```

IR

Compiled filesize 438.58 Kb (449,104 bytes) ```cpp #define FX_0 "/home/runner/.choosenim/toolchains/nim-#devel/config/nim.cfg" #define FX_1 "/home/runner/.choosenim/toolchains/nim-#devel/config/config.nims" #define FX_2 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system.nim" #define FX_3 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/basic_types.nim" #define FX_4 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/compilation.nim" #define FX_5 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arithmetics.nim" #define FX_6 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/comparisons.nim" #define FX_7 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/inclrtl.nim" #define FX_8 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/exceptions.nim" #define FX_9 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/setops.nim" #define FX_10 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/since.nim" #define FX_11 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/ctypes.nim" #define FX_12 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/rawquits.nim" #define FX_13 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/memalloc.nim" #define FX_14 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators_1.nim" #define FX_15 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/fatal.nim" #define FX_16 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim" #define FX_17 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/miscdollars.nim" #define FX_18 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/digitsutils.nim" #define FX_19 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/iterators.nim" #define FX_20 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/gc_interface.nim" #define FX_21 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/coro_detection.nim" #define FX_22 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/dollars.nim" #define FX_23 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/formatfloat.nim" #define FX_24 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/dragonbox.nim" #define FX_25 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/schubfach.nim" #define FX_26 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/objectdollar.nim" #define FX_27 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/indices.nim" #define FX_28 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/nimscript.nim" #define FX_29 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/widestrs.nim" #define FX_30 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/syncio.nim" #define FX_31 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #define FX_32 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/hti.nim" #define FX_33 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/sysatomics.nim" #define FX_34 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/bitmasks.nim" #define FX_35 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/ansi_c.nim" #define FX_36 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/memory.nim" #define FX_37 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/syslocks.nim" #define FX_38 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/threadlocalstorage.nim" #define FX_39 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/threadtypes.nim" #define FX_40 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/strs_v2.nim" #define FX_41 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/seqs_v2.nim" #define FX_42 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arc.nim" #define FX_43 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/cellsets.nim" #define FX_44 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/orc.nim" #define FX_45 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/cellseqs_v2.nim" #define FX_46 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/threadids.nim" #define FX_47 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/threadimpl.nim" #define FX_48 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/typedthreads.nim" #define FX_49 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/excpt.nim" #define FX_50 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/stacktraces.nim" #define FX_51 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/chcks.nim" #define FX_52 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/indexerrors.nim" #define FX_53 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/integerops.nim" #define FX_54 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/dyncalls.nim" #define FX_55 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/countbits_impl.nim" #define FX_56 "/home/runner/.choosenim/toolchains/nim-#devel/lib/std/private/bitops_utils.nim" #define FX_57 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/sets.nim" #define FX_58 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/mmdisp.nim" #define FX_59 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/mm/malloc.nim" #define FX_60 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/strmantle.nim" #define FX_61 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/assign.nim" #define FX_62 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/seqs_v2_reimpl.nim" #define FX_63 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/channels_builtin.nim" #define FX_64 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/repr_v2.nim" #define FX_65 "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/deepcopy.nim" #define FX_66 "/home/runner/.choosenim/toolchains/nim-#devel/lib/nimhcr.nim" #define NIM_INTBITS 64 #include "nimbase.h" #define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); #define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); #define nimln_(n) \ FR_.line = n; #define nimlf_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ; typedef struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content; typedef struct tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA; typedef struct tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 { void* destructor; NI size; NI16 align; NI16 depth; NU32* display; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; void* vTable[SEQ_DECL_SIZE]; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ { NI len; tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content* p; }; struct Exception { RootObj Sup; Exception* parent; NCSTRING name; NimStringV2 message; tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ trace; Exception* up; }; struct tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; }; struct tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg { NCSTRING procname; NI line; NCSTRING filename; }; struct tySequence__9bNRJkU9cJnNkESCDTQ7DgcQ_Content { NI cap; tyObject_StackTraceEntry__2Xjg6E7TZG7p9bcgUNTKHrg data[SEQ_DECL_SIZE]; }; N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3seqI3intE)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0); static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, _ZN6system21callDepthLimitReachedE)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool)(Exception** dest_p0, Exception* src_p1, NIM_BOOL cyclic_p2); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3refIN6system6DefectEE)(tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA* dest_p0); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern NIM_THREADVAR TFrame* framePtr__system_u2652; extern NIM_THREADVAR Exception* currException__system_u4409; extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4744; #line 570 FX_49 static N_INLINE(void, nimFrame)(TFrame* s_p0) { #line 571 FX_49 { if (!(framePtr__system_u2652 == ((TFrame*) NIM_NIL))) goto LA3_; #line 572 FX_49 (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { #line 575 FX_49 (*s_p0).calldepth = (NI16)((*framePtr__system_u2652).calldepth + ((NI16)1)); } LA1_: ; #line 577 FX_49 (*s_p0).prev = framePtr__system_u2652; #line 578 FX_49 framePtr__system_u2652 = s_p0; #line 579 FX_49 { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; _ZN6system21callDepthLimitReachedE(); } LA8_: ; } #line 118 FX_49 static N_INLINE(void, popFrame)(void) { #line 119 FX_49 framePtr__system_u2652 = (*framePtr__system_u2652).prev;} #line 261 FX_42 static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2) { NIM_BOOL result; NIM_BOOL T1_; nimfr_("isObjDisplayCheck", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system/arc.nim"); #line 262 FX_42 T1_ = (NIM_BOOL)0; T1_ = (targetDepth_p1 <= (*source_p0).depth); if (!(T1_)) goto LA2_; T1_ = ((*source_p0).display[targetDepth_p1] == token_p2);LA2_: ; result = T1_; popFrame(); return result;} #line 2278 FX_2 static N_INLINE(Exception*, nimBorrowCurrentException)(void) { Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system.nim"); #line 2281 FX_2 result = currException__system_u4409; popFrame(); return result;} #line 2274 FX_2 static N_INLINE(Exception*, getCurrentException)(void) { Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-#devel/lib/system.nim"); result = NIM_NIL; #line 287 FX_48 _ZN6system7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&result, currException__system_u4409, NIM_FALSE); popFrame(); return result;} #line 157 FX_49 static N_INLINE(void, popCurrentException)(void) { #line 287 FX_48 _ZN6system7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&currException__system_u4409, (*currException__system_u4409).up, NIM_FALSE); } #line 444 FX_49 static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; #line 445 FX_49 result = (&nimInErrorMode__system_u4744); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { #if 0 void (*volatile inner)(void); inner = PreMainInner; atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000(); (*inner)(); #else atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000(); PreMainInner(); #endif } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { #if 0 void (*volatile inner)(void); PreMain(); inner = NimMainInner; (*inner)(); #else PreMain(); NimMainInner(); #endif } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 FX_31 a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI)0); #line 3 FX_31 if (((NI)1) < 0 || ((NI)1) >= a__temp_u5.len){ raiseIndexError2(((NI)1),a__temp_u5.len-1); goto LA1_; } a__temp_u5.p->data[((NI)1)] = ((NI)0); #line 2 FX_31 _ZN6system10eqdestroy_E3seqI3intE(a__temp_u5); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObjDisplayCheck(nimBorrowCurrentException()->Sup.m_type, 2, 3308231424)) { #line 4 FX_31 tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 5 FX_31 T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__gsUvm1TlLk4IWPmIwVL9aHA*) (T6_)); #line 5 FX_31 T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 FX_31 _ZN6system10eqdestroy_E3refIN6system6DefectEE(err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T15:40:48
  • Finished 2024-06-15T15:40:51
  • Duration 3 minutes

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
stable :-1: FAIL

Output

``` Error: Command failed: nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp command line(1, 2) Warning: `gc:option` is deprecated; use `mm:option` instead [Deprecated] [added root] (null) 0 root index: 1; RC: 0; color: 0; thread: 2775 Invalid read of size 1 at 0x4853A6E: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C507: system::registerCycle(ptr, ptr) (orc.nim:419) by 0x10C6DA: system::rememberCycle(bool, ptr, ptr) (orc.nim:475) by 0x11387E: nimDecRefIsLastCyclicDyn (orc.nim:486) by 0x11387E: system::eqdestroy_(ref) (temp.nim:4) by 0x114783: NimMainModule (temp.nim:4) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) by 0x11484C: main (excpt.nim:464) Address 0x0 is not stack'd, malloc'd or (recently) free'd Traceback (most recent call last) /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim temp /home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/orc.nim nimDecRefIsLastCyclicDyn /home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/orc.nim rememberCycle /home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/orc.nim registerCycle SIGSEGV: Illegal storage access. (Attempt to read from nil?) 16 bytes in 1 blocks are still reachable in loss record 1 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B248: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10B2BE: system::allocShared0Impl(range09223372036854775807) (malloc.nim:37) by 0x111DB7: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:351) by 0x1122DF: newSeqPayload (seqs_v2.nim:44) by 0x1144F6: NimMainModule (temp.nim:2) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) by 0x11484C: main (excpt.nim:464) 30 bytes in 1 blocks are still reachable in loss record 2 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x10B37B: rawNewString (strs_v2.nim:39) by 0x10B46B: raiseIndexError2 (indexerrors.nim:9) by 0x114598: NimMainModule (temp.nim:3) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) by 0x11484C: main (excpt.nim:464) 56 bytes in 1 blocks are still reachable in loss record 3 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B248: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10B2BE: system::allocShared0Impl(range09223372036854775807) (malloc.nim:37) by 0x111DB7: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:351) by 0x1122DF: newSeqPayload (seqs_v2.nim:44) by 0x1123C1: prepareSeqAdd (seqs_v2.nim:62) by 0x112907: setLen::setLen(var >, range09223372036854775807) (seqs_v2.nim:133) by 0x112991: newSeq::newSeq(var >, range09223372036854775807) (seqs_v2.nim:140) by 0x112A2E: newSeq::newSeq(range09223372036854775807) (system.nim:631) 88 bytes in 1 blocks are still reachable in loss record 4 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B248: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10B2BE: system::allocShared0Impl(range09223372036854775807) (malloc.nim:37) by 0x111DB7: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:351) by 0x111F50: nimNewObj (arc.nim:81) by 0x10B6E0: _ZN8sysFatal8sysFatalE8typeDescIN10exceptions11IndexDefectEE4sinkI6stringE (fatal.nim:53) by 0x10B6E0: raiseIndexError2 (chcks.nim:28) by 0x114598: NimMainModule (temp.nim:3) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) 2,009 bytes in 1 blocks are still reachable in loss record 5 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x10B37B: rawNewString (strs_v2.nim:39) by 0x112F7C: signalHandler (excpt.nim:630) by 0x48A951F: ??? (in /usr/lib/x86_64-linux-gnu/libc.so.6) by 0x4853A6D: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C507: system::registerCycle(ptr, ptr) (orc.nim:419) by 0x10C6DA: system::rememberCycle(bool, ptr, ptr) (orc.nim:475) 4,096 bytes in 1 blocks are still reachable in loss record 6 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x48E5BA3: _IO_file_doallocate (filedoalloc.c:101) by 0x48F4CDF: _IO_doallocbuf (genops.c:347) by 0x48F3F5F: _IO_file_overflow@@GLIBC_2.2.5 (fileops.c:744) by 0x48F26D4: _IO_new_file_xsputn (fileops.c:1243) by 0x48F26D4: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1196) by 0x48E6FD6: fwrite (iofwrite.c:39) by 0x1136BB: echoBinSafe (system.nim:2758) by 0x11477B: NimMainModule (temp.nim:5) by 0x11480F: NimMainInner (excpt.nim:445) 16,384 bytes in 1 blocks are still reachable in loss record 7 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x112EEB: init::init(var > >, int) (cellseqs_v2.nim:37) by 0x10C581: system::registerCycle(ptr, ptr) (orc.nim:412) by 0x10C6DA: system::rememberCycle(bool, ptr, ptr) (orc.nim:475) by 0x11387E: nimDecRefIsLastCyclicDyn (orc.nim:486) by 0x11387E: system::eqdestroy_(ref) (temp.nim:4) by 0x114783: NimMainModule (temp.nim:4) by 0x11480F: NimMainInner (excpt.nim:445) ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) 1 errors in context 1 of 8: Invalid read of size 1 at 0x4853A6E: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C507: system::registerCycle(ptr, ptr) (orc.nim:419) by 0x10C6DA: system::rememberCycle(bool, ptr, ptr) (orc.nim:475) by 0x11387E: nimDecRefIsLastCyclicDyn (orc.nim:486) by 0x11387E: system::eqdestroy_(ref) (temp.nim:4) by 0x114783: NimMainModule (temp.nim:4) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) by 0x11484C: main (excpt.nim:464) Address 0x0 is not stack'd, malloc'd or (recently) free'd ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) Segmentation fault (core dumped) ```

IR

Compiled filesize 395.00 Kb (404,480 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); #define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); #define nimln_(n) \ FR_.line = n; #define nimlf_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ; typedef struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content; typedef struct tyObject_Defect__4irTbIOnlxhyYExShRxlog tyObject_Defect__4irTbIOnlxhyYExShRxlog; typedef struct tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 { void* destructor; NI size; NI16 align; NI16 depth; NU32* display; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ { NI len; tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content* p; }; struct Exception { RootObj Sup; Exception* parent; NCSTRING name; NimStringV2 message; tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ trace; Exception* up; }; struct tyObject_Defect__4irTbIOnlxhyYExShRxlog { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; }; struct tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ { NCSTRING procname; NI line; NCSTRING filename; }; struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content { NI cap; tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ data[SEQ_DECL_SIZE]; }; N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1); N_LIB_PRIVATE N_NIMCALL(void, _ZN3at_10eqdestroy_E3seqI3intE)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0); static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, _ZN6system21callDepthLimitReachedE)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, _ZN12newException7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool)(Exception** dest_p0, Exception* src_p1, NIM_BOOL cyclic_p2); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3refIN6system6DefectEE)(tyObject_Defect__4irTbIOnlxhyYExShRxlog* dest_p0); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern NIM_THREADVAR TFrame* framePtr__system_u4431; extern NIM_THREADVAR Exception* currException__system_u4433; extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4814; #line 549 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(void, nimFrame)(TFrame* s_p0) { #line 550 { if (!(framePtr__system_u4431 == ((TFrame*) NIM_NIL))) goto LA3_; #line 551 (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { #line 554 (*s_p0).calldepth = (NI16)((*framePtr__system_u4431).calldepth + ((NI16)1)); } LA1_: ; #line 556 (*s_p0).prev = framePtr__system_u4431; #line 557 framePtr__system_u4431 = s_p0; #line 558 { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; _ZN6system21callDepthLimitReachedE(); } LA8_: ; } #line 99 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(void, popFrame)(void) { #line 100 framePtr__system_u4431 = (*framePtr__system_u4431).prev;} #line 237 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/arc.nim" static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2) { NIM_BOOL result; NIM_BOOL T1_; nimfr_("isObjDisplayCheck", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/arc.nim"); #line 238 T1_ = (NIM_BOOL)0; T1_ = (targetDepth_p1 <= (*source_p0).depth); if (!(T1_)) goto LA2_; T1_ = ((*source_p0).display[targetDepth_p1] == token_p2);LA2_: ; result = T1_; popFrame(); return result;} #line 2209 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim" static N_INLINE(Exception*, nimBorrowCurrentException)(void) { Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim"); #line 2212 result = currException__system_u4433; popFrame(); return result;} #line 2205 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim" static N_INLINE(Exception*, getCurrentException)(void) { Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim"); result = NIM_NIL; #line 247 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/std/typedthreads.nim" _ZN12newException7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&result, currException__system_u4433, NIM_FALSE); popFrame(); return result;} #line 137 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(void, popCurrentException)(void) { #line 247 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/std/typedthreads.nim" _ZN12newException7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&currException__system_u4433, (*currException__system_u4433).up, NIM_FALSE); } #line 423 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; #line 424 result = (&nimInErrorMode__system_u4814); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { #if 0 void (*volatile inner)(void); inner = PreMainInner; atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000(); (*inner)(); #else atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000(); PreMainInner(); #endif } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { #if 0 void (*volatile inner)(void); PreMain(); inner = NimMainInner; (*inner)(); #else PreMain(); NimMainInner(); #endif } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI)0); #line 3 if (((NI)1) < 0 || ((NI)1) >= a__temp_u5.len){ raiseIndexError2(((NI)1),a__temp_u5.len-1); goto LA1_; } a__temp_u5.p->data[((NI)1)] = ((NI)0); #line 2 _ZN3at_10eqdestroy_E3seqI3intE(a__temp_u5); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObjDisplayCheck(nimBorrowCurrentException()->Sup.m_type, 2, 718498816)) { #line 4 tyObject_Defect__4irTbIOnlxhyYExShRxlog* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 5 T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__4irTbIOnlxhyYExShRxlog*) (T6_)); #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 _ZN6system10eqdestroy_E3refIN6system6DefectEE(err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T15:40:51
  • Finished 2024-06-15T15:40:52
  • Duration 1 minutes

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
2.0.4 :-1: FAIL

Output

``` Error: Command failed: nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp command line(1, 2) Warning: `gc:option` is deprecated; use `mm:option` instead [Deprecated] [added root] (null) 0 root index: 1; RC: 0; color: 0; thread: 2821 Invalid read of size 1 at 0x4853A6E: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C507: system::registerCycle(ptr, ptr) (orc.nim:419) by 0x10C6DA: system::rememberCycle(bool, ptr, ptr) (orc.nim:475) by 0x11387E: nimDecRefIsLastCyclicDyn (orc.nim:486) by 0x11387E: system::eqdestroy_(ref) (temp.nim:4) by 0x114783: NimMainModule (temp.nim:4) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) by 0x11484C: main (excpt.nim:464) Address 0x0 is not stack'd, malloc'd or (recently) free'd Traceback (most recent call last) /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim temp /home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/orc.nim nimDecRefIsLastCyclicDyn /home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/orc.nim rememberCycle /home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/orc.nim registerCycle SIGSEGV: Illegal storage access. (Attempt to read from nil?) 16 bytes in 1 blocks are still reachable in loss record 1 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B248: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10B2BE: system::allocShared0Impl(range09223372036854775807) (malloc.nim:37) by 0x111DB7: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:351) by 0x1122DF: newSeqPayload (seqs_v2.nim:44) by 0x1144F6: NimMainModule (temp.nim:2) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) by 0x11484C: main (excpt.nim:464) 30 bytes in 1 blocks are still reachable in loss record 2 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x10B37B: rawNewString (strs_v2.nim:39) by 0x10B46B: raiseIndexError2 (indexerrors.nim:9) by 0x114598: NimMainModule (temp.nim:3) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) by 0x11484C: main (excpt.nim:464) 56 bytes in 1 blocks are still reachable in loss record 3 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B248: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10B2BE: system::allocShared0Impl(range09223372036854775807) (malloc.nim:37) by 0x111DB7: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:351) by 0x1122DF: newSeqPayload (seqs_v2.nim:44) by 0x1123C1: prepareSeqAdd (seqs_v2.nim:62) by 0x112907: setLen::setLen(var >, range09223372036854775807) (seqs_v2.nim:133) by 0x112991: newSeq::newSeq(var >, range09223372036854775807) (seqs_v2.nim:140) by 0x112A2E: newSeq::newSeq(range09223372036854775807) (system.nim:631) 88 bytes in 1 blocks are still reachable in loss record 4 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B248: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10B2BE: system::allocShared0Impl(range09223372036854775807) (malloc.nim:37) by 0x111DB7: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:351) by 0x111F50: nimNewObj (arc.nim:81) by 0x10B6E0: _ZN8sysFatal8sysFatalE8typeDescIN10exceptions11IndexDefectEE4sinkI6stringE (fatal.nim:53) by 0x10B6E0: raiseIndexError2 (chcks.nim:28) by 0x114598: NimMainModule (temp.nim:3) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) 2,009 bytes in 1 blocks are still reachable in loss record 5 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x10B37B: rawNewString (strs_v2.nim:39) by 0x112F7C: signalHandler (excpt.nim:630) by 0x48A951F: ??? (in /usr/lib/x86_64-linux-gnu/libc.so.6) by 0x4853A6D: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C507: system::registerCycle(ptr, ptr) (orc.nim:419) by 0x10C6DA: system::rememberCycle(bool, ptr, ptr) (orc.nim:475) 4,096 bytes in 1 blocks are still reachable in loss record 6 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x48E5BA3: _IO_file_doallocate (filedoalloc.c:101) by 0x48F4CDF: _IO_doallocbuf (genops.c:347) by 0x48F3F5F: _IO_file_overflow@@GLIBC_2.2.5 (fileops.c:744) by 0x48F26D4: _IO_new_file_xsputn (fileops.c:1243) by 0x48F26D4: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1196) by 0x48E6FD6: fwrite (iofwrite.c:39) by 0x1136BB: echoBinSafe (system.nim:2758) by 0x11477B: NimMainModule (temp.nim:5) by 0x11480F: NimMainInner (excpt.nim:445) 16,384 bytes in 1 blocks are still reachable in loss record 7 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B1FB: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10B20D: allocSharedImpl (malloc.nim:34) by 0x112EEB: init::init(var > >, int) (cellseqs_v2.nim:37) by 0x10C581: system::registerCycle(ptr, ptr) (orc.nim:412) by 0x10C6DA: system::rememberCycle(bool, ptr, ptr) (orc.nim:475) by 0x11387E: nimDecRefIsLastCyclicDyn (orc.nim:486) by 0x11387E: system::eqdestroy_(ref) (temp.nim:4) by 0x114783: NimMainModule (temp.nim:4) by 0x11480F: NimMainInner (excpt.nim:445) ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) 1 errors in context 1 of 8: Invalid read of size 1 at 0x4853A6E: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C507: system::registerCycle(ptr, ptr) (orc.nim:419) by 0x10C6DA: system::rememberCycle(bool, ptr, ptr) (orc.nim:475) by 0x11387E: nimDecRefIsLastCyclicDyn (orc.nim:486) by 0x11387E: system::eqdestroy_(ref) (temp.nim:4) by 0x114783: NimMainModule (temp.nim:4) by 0x11480F: NimMainInner (excpt.nim:445) by 0x114826: NimMain (excpt.nim:456) by 0x11484C: main (excpt.nim:464) Address 0x0 is not stack'd, malloc'd or (recently) free'd ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) Segmentation fault (core dumped) ```

IR

Compiled filesize 395.00 Kb (404,480 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); #define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); #define nimln_(n) \ FR_.line = n; #define nimlf_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ; typedef struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content; typedef struct tyObject_Defect__4irTbIOnlxhyYExShRxlog tyObject_Defect__4irTbIOnlxhyYExShRxlog; typedef struct tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 { void* destructor; NI size; NI16 align; NI16 depth; NU32* display; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ { NI len; tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content* p; }; struct Exception { RootObj Sup; Exception* parent; NCSTRING name; NimStringV2 message; tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ trace; Exception* up; }; struct tyObject_Defect__4irTbIOnlxhyYExShRxlog { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; }; struct tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ { NCSTRING procname; NI line; NCSTRING filename; }; struct tySequence__W5u7dtuXI9c4BOBf9bW9bZhWQ_Content { NI cap; tyObject_StackTraceEntry__6CL1lcV9bxEp7TPS0fN8sRQ data[SEQ_DECL_SIZE]; }; N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1); N_LIB_PRIVATE N_NIMCALL(void, _ZN3at_10eqdestroy_E3seqI3intE)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0); static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, _ZN6system21callDepthLimitReachedE)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, _ZN12newException7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool)(Exception** dest_p0, Exception* src_p1, NIM_BOOL cyclic_p2); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3refIN6system6DefectEE)(tyObject_Defect__4irTbIOnlxhyYExShRxlog* dest_p0); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern NIM_THREADVAR TFrame* framePtr__system_u4431; extern NIM_THREADVAR Exception* currException__system_u4433; extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4814; #line 549 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(void, nimFrame)(TFrame* s_p0) { #line 550 { if (!(framePtr__system_u4431 == ((TFrame*) NIM_NIL))) goto LA3_; #line 551 (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { #line 554 (*s_p0).calldepth = (NI16)((*framePtr__system_u4431).calldepth + ((NI16)1)); } LA1_: ; #line 556 (*s_p0).prev = framePtr__system_u4431; #line 557 framePtr__system_u4431 = s_p0; #line 558 { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; _ZN6system21callDepthLimitReachedE(); } LA8_: ; } #line 99 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(void, popFrame)(void) { #line 100 framePtr__system_u4431 = (*framePtr__system_u4431).prev;} #line 237 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/arc.nim" static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2) { NIM_BOOL result; NIM_BOOL T1_; nimfr_("isObjDisplayCheck", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/arc.nim"); #line 238 T1_ = (NIM_BOOL)0; T1_ = (targetDepth_p1 <= (*source_p0).depth); if (!(T1_)) goto LA2_; T1_ = ((*source_p0).display[targetDepth_p1] == token_p2);LA2_: ; result = T1_; popFrame(); return result;} #line 2209 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim" static N_INLINE(Exception*, nimBorrowCurrentException)(void) { Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim"); #line 2212 result = currException__system_u4433; popFrame(); return result;} #line 2205 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim" static N_INLINE(Exception*, getCurrentException)(void) { Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system.nim"); result = NIM_NIL; #line 247 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/std/typedthreads.nim" _ZN12newException7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&result, currException__system_u4433, NIM_FALSE); popFrame(); return result;} #line 137 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(void, popCurrentException)(void) { #line 247 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/std/typedthreads.nim" _ZN12newException7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&currException__system_u4433, (*currException__system_u4433).up, NIM_FALSE); } #line 423 "/home/runner/.choosenim/toolchains/nim-2.0.4/lib/system/excpt.nim" static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; #line 424 result = (&nimInErrorMode__system_u4814); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { #if 0 void (*volatile inner)(void); inner = PreMainInner; atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000(); (*inner)(); #else atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000(); PreMainInner(); #endif } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { #if 0 void (*volatile inner)(void); PreMain(); inner = NimMainInner; (*inner)(); #else PreMain(); NimMainInner(); #endif } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI)0); #line 3 if (((NI)1) < 0 || ((NI)1) >= a__temp_u5.len){ raiseIndexError2(((NI)1),a__temp_u5.len-1); goto LA1_; } a__temp_u5.p->data[((NI)1)] = ((NI)0); #line 2 _ZN3at_10eqdestroy_E3seqI3intE(a__temp_u5); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObjDisplayCheck(nimBorrowCurrentException()->Sup.m_type, 2, 718498816)) { #line 4 tyObject_Defect__4irTbIOnlxhyYExShRxlog* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 5 T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__4irTbIOnlxhyYExShRxlog*) (T6_)); #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 _ZN6system10eqdestroy_E3refIN6system6DefectEE(err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T15:40:53
  • Finished 2024-06-15T15:40:54
  • Duration 1 minutes

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
2.0.0 :-1: FAIL

Output

``` Error: Command failed: nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp command line(1, 2) Warning: `gc:option` is deprecated; use `mm:option` instead [Deprecated] [added root] (null) 0 root index: 1; RC: 0; color: 0; thread: 2879 Invalid read of size 1 at 0x4853A6E: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C5A1: registerCycle__system_u3770 (orc.nim:419) by 0x10C774: rememberCycle__system_u3810 (orc.nim:475) by 0x113715: nimDecRefIsLastCyclicDyn (orc.nim:486) by 0x113715: eqdestroy___temp_u171 (temp.nim:4) by 0x114635: NimMainModule (temp.nim:4) by 0x1146C1: NimMainInner (excpt.nim:445) by 0x1146D8: NimMain (excpt.nim:456) by 0x1146FE: main (excpt.nim:464) Address 0x0 is not stack'd, malloc'd or (recently) free'd Traceback (most recent call last) /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim temp /home/runner/.choosenim/toolchains/nim-2.0.0/lib/system/orc.nim nimDecRefIsLastCyclicDyn /home/runner/.choosenim/toolchains/nim-2.0.0/lib/system/orc.nim rememberCycle /home/runner/.choosenim/toolchains/nim-2.0.0/lib/system/orc.nim registerCycle SIGSEGV: Illegal storage access. (Attempt to read from nil?) 16 bytes in 1 blocks are still reachable in loss record 1 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B229: alloc0Impl__system_u1763 (malloc.nim:11) by 0x10B23B: allocShared0Impl__system_u1776 (malloc.nim:37) by 0x11056F: alignedAlloc0__system_u1947 (memalloc.nim:351) by 0x1106B6: newSeqPayload (seqs_v2.nim:44) by 0x1143A8: NimMainModule (temp.nim:2) by 0x1146C1: NimMainInner (excpt.nim:445) by 0x1146D8: NimMain (excpt.nim:456) by 0x1146FE: main (excpt.nim:464) 30 bytes in 1 blocks are still reachable in loss record 2 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B229: alloc0Impl__system_u1763 (malloc.nim:11) by 0x10B23B: allocShared0Impl__system_u1776 (malloc.nim:37) by 0x10B3D1: rawNewString (strs_v2.nim:111) by 0x10B505: raiseIndexError2 (indexerrors.nim:9) by 0x11444A: NimMainModule (temp.nim:3) by 0x1146C1: NimMainInner (excpt.nim:445) by 0x1146D8: NimMain (excpt.nim:456) by 0x1146FE: main (excpt.nim:464) 56 bytes in 1 blocks are still reachable in loss record 3 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B229: alloc0Impl__system_u1763 (malloc.nim:11) by 0x10B23B: allocShared0Impl__system_u1776 (malloc.nim:37) by 0x11056F: alignedAlloc0__system_u1947 (memalloc.nim:351) by 0x1106B6: newSeqPayload (seqs_v2.nim:44) by 0x110BBF: prepareSeqAdd (seqs_v2.nim:62) by 0x11110B: setLen__stdZassertions_u111 (seqs_v2.nim:133) by 0x111195: newSeq__system_u4560 (seqs_v2.nim:140) by 0x111232: newSeq__system_u4572 (system.nim:635) 88 bytes in 1 blocks are still reachable in loss record 4 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B229: alloc0Impl__system_u1763 (malloc.nim:11) by 0x10B23B: allocShared0Impl__system_u1776 (malloc.nim:37) by 0x11056F: alignedAlloc0__system_u1947 (memalloc.nim:351) by 0x112754: nimNewObj (arc.nim:81) by 0x10B77A: sysFatal__system_u5146 (fatal.nim:53) by 0x10B77A: raiseIndexError2 (chcks.nim:28) by 0x11444A: NimMainModule (temp.nim:3) by 0x1146C1: NimMainInner (excpt.nim:445) by 0x1146D8: NimMain (excpt.nim:456) 2,009 bytes in 1 blocks are still reachable in loss record 5 of 7 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B229: alloc0Impl__system_u1763 (malloc.nim:11) by 0x10B23B: allocShared0Impl__system_u1776 (malloc.nim:37) by 0x10B3D1: rawNewString (strs_v2.nim:111) by 0x112E13: signalHandler (excpt.nim:630) by 0x48A951F: ??? (in /usr/lib/x86_64-linux-gnu/libc.so.6) by 0x4853A6D: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C5A1: registerCycle__system_u3770 (orc.nim:419) by 0x10C774: rememberCycle__system_u3810 (orc.nim:475) 4,096 bytes in 1 blocks are still reachable in loss record 6 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x48E5BA3: _IO_file_doallocate (filedoalloc.c:101) by 0x48F4CDF: _IO_doallocbuf (genops.c:347) by 0x48F3F5F: _IO_file_overflow@@GLIBC_2.2.5 (fileops.c:744) by 0x48F26D4: _IO_new_file_xsputn (fileops.c:1243) by 0x48F26D4: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1196) by 0x48E6FD6: fwrite (iofwrite.c:39) by 0x113552: echoBinSafe (system.nim:2758) by 0x11462D: NimMainModule (temp.nim:5) by 0x1146C1: NimMainInner (excpt.nim:445) 16,384 bytes in 1 blocks are still reachable in loss record 7 of 7 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10B24D: allocImpl__system_u1761 (malloc.nim:5) by 0x10B25F: allocSharedImpl (malloc.nim:34) by 0x112D82: init__system_u3629 (cellseqs_v2.nim:37) by 0x10C61B: registerCycle__system_u3770 (orc.nim:412) by 0x10C774: rememberCycle__system_u3810 (orc.nim:475) by 0x113715: nimDecRefIsLastCyclicDyn (orc.nim:486) by 0x113715: eqdestroy___temp_u171 (temp.nim:4) by 0x114635: NimMainModule (temp.nim:4) by 0x1146C1: NimMainInner (excpt.nim:445) ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) 1 errors in context 1 of 8: Invalid read of size 1 at 0x4853A6E: strstr (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C5A1: registerCycle__system_u3770 (orc.nim:419) by 0x10C774: rememberCycle__system_u3810 (orc.nim:475) by 0x113715: nimDecRefIsLastCyclicDyn (orc.nim:486) by 0x113715: eqdestroy___temp_u171 (temp.nim:4) by 0x114635: NimMainModule (temp.nim:4) by 0x1146C1: NimMainInner (excpt.nim:445) by 0x1146D8: NimMain (excpt.nim:456) by 0x1146FE: main (excpt.nim:464) Address 0x0 is not stack'd, malloc'd or (recently) free'd ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0) Segmentation fault (core dumped) ```

IR

Compiled filesize 389.96 Kb (399,320 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); #define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); #define nimln_(n) \ FR_.line = n; #define nimlf_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__2ALwPJKv8Nz8mMm4Hy9crdw tySequence__2ALwPJKv8Nz8mMm4Hy9crdw; typedef struct tySequence__2ALwPJKv8Nz8mMm4Hy9crdw_Content tySequence__2ALwPJKv8Nz8mMm4Hy9crdw_Content; typedef struct tyObject_Defect__Iv1kmFgzznzmeWaBCBYLxw tyObject_Defect__Iv1kmFgzznzmeWaBCBYLxw; typedef struct tyObject_StackTraceEntry__nOjYJiLBbFH64nNmW1UArA tyObject_StackTraceEntry__nOjYJiLBbFH64nNmW1UArA; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 { void* destructor; NI size; NI16 align; NI16 depth; NU32* display; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; struct tySequence__2ALwPJKv8Nz8mMm4Hy9crdw { NI len; tySequence__2ALwPJKv8Nz8mMm4Hy9crdw_Content* p; }; struct Exception { RootObj Sup; Exception* parent; NCSTRING name; NimStringV2 message; tySequence__2ALwPJKv8Nz8mMm4Hy9crdw trace; Exception* up; }; struct tyObject_Defect__Iv1kmFgzznzmeWaBCBYLxw { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; }; struct tyObject_StackTraceEntry__nOjYJiLBbFH64nNmW1UArA { NCSTRING procname; NI line; NCSTRING filename; }; struct tySequence__2ALwPJKv8Nz8mMm4Hy9crdw_Content { NI cap; tyObject_StackTraceEntry__nOjYJiLBbFH64nNmW1UArA data[SEQ_DECL_SIZE]; }; N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u10)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0); static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u5018)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___stdZtypedthreads_u207)(Exception** dest_p0, Exception* src_p1, NIM_BOOL cyclic_p2); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___temp_u171)(tyObject_Defect__Iv1kmFgzznzmeWaBCBYLxw* dest_p0); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern NIM_THREADVAR TFrame* framePtr__system_u4417; extern NIM_THREADVAR Exception* currException__system_u4419; extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4800; #line 549 "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system/excpt.nim" static N_INLINE(void, nimFrame)(TFrame* s_p0) { #line 550 { if (!(framePtr__system_u4417 == ((TFrame*) NIM_NIL))) goto LA3_; #line 551 (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { #line 554 (*s_p0).calldepth = (NI16)((*framePtr__system_u4417).calldepth + ((NI16)1)); } LA1_: ; #line 556 (*s_p0).prev = framePtr__system_u4417; #line 557 framePtr__system_u4417 = s_p0; #line 558 { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; callDepthLimitReached__system_u5018(); } LA8_: ; } #line 99 "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system/excpt.nim" static N_INLINE(void, popFrame)(void) { #line 100 framePtr__system_u4417 = (*framePtr__system_u4417).prev;} #line 237 "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system/arc.nim" static N_INLINE(NIM_BOOL, isObjDisplayCheck)(TNimTypeV2* source_p0, NI16 targetDepth_p1, NU32 token_p2) { NIM_BOOL result; NIM_BOOL T1_; nimfr_("isObjDisplayCheck", "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system/arc.nim"); result = (NIM_BOOL)0; #line 238 T1_ = (NIM_BOOL)0; T1_ = (targetDepth_p1 <= (*source_p0).depth); if (!(T1_)) goto LA2_; T1_ = ((*source_p0).display[targetDepth_p1] == token_p2);LA2_: ; result = T1_; popFrame(); return result;} #line 2209 "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system.nim" static N_INLINE(Exception*, nimBorrowCurrentException)(void) { Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system.nim"); result = NIM_NIL; #line 2212 result = currException__system_u4419; popFrame(); return result;} #line 2205 "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system.nim" static N_INLINE(Exception*, getCurrentException)(void) { Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system.nim"); result = NIM_NIL; #line 247 "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/std/typedthreads.nim" eqcopy___stdZtypedthreads_u207(&result, currException__system_u4419, NIM_FALSE); popFrame(); return result;} #line 137 "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system/excpt.nim" static N_INLINE(void, popCurrentException)(void) { #line 247 "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/std/typedthreads.nim" eqcopy___stdZtypedthreads_u207(&currException__system_u4419, (*currException__system_u4419).up, NIM_FALSE); } #line 423 "/home/runner/.choosenim/toolchains/nim-2.0.0/lib/system/excpt.nim" static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; result = (NIM_BOOL*)0; #line 424 result = (&nimInErrorMode__system_u4800); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { #if 0 void (*volatile inner)(void); inner = PreMainInner; atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000(); (*inner)(); #else atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000(); PreMainInner(); #endif } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { #if 0 void (*volatile inner)(void); PreMain(); inner = NimMainInner; (*inner)(); #else PreMain(); NimMainInner(); #endif } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI)0); #line 3 if (((NI)1) < 0 || ((NI)1) >= a__temp_u5.len){ raiseIndexError2(((NI)1),a__temp_u5.len-1); goto LA1_; } a__temp_u5.p->data[((NI)1)] = ((NI)0); #line 2 eqdestroy___temp_u10(a__temp_u5); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObjDisplayCheck(nimBorrowCurrentException()->Sup.m_type, 2, 4251228160)) { #line 4 tyObject_Defect__Iv1kmFgzznzmeWaBCBYLxw* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 5 T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__Iv1kmFgzznzmeWaBCBYLxw*) (T6_)); #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 eqdestroy___temp_u171(err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T15:40:57
  • Finished 2024-06-15T15:40:58
  • Duration 1 minutes

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
1.6.20 :-1: FAIL

Output

``` Error: Command failed: nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp [added root] |IndexDefect|Defect|Exception|RootObj| 0 root index: 1; RC: 0; color: 0 16 bytes in 1 blocks are still reachable in loss record 1 of 5 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x109E41: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10DC07: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:353) by 0x10EEA2: newSeqPayload (seqs_v2.nim:38) by 0x1141C6: NimMainModule (temp.nim:2) by 0x1145DE: NimMainInner (excpt.nim:439) by 0x1145F5: NimMain (excpt.nim:444) by 0x11461B: main (excpt.nim:451) 48 bytes in 1 blocks are still reachable in loss record 2 of 5 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x109E41: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10FAEE: system::cellSetPut(var, uInt) (cellsets.nim:154) by 0x10C72A: system::incl(var, ptr) (cellsets.nim:173) by 0x10C88D: nimRawDispose (arc.nim:161) by 0x10C991: nimDestroyAndDispose (arc.nim:180) by 0x10CCE1: FrameState::eqcopy_(var >, ref, bool) (excpt.nim:89) by 0x114539: popCurrentException (excpt.nim:89) by 0x114539: NimMainModule (temp.nim:6) by 0x1145DE: NimMainInner (excpt.nim:439) 88 bytes in 1 blocks are still reachable in loss record 3 of 5 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x109E41: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10DC07: system::alignedAlloc0(range09223372036854775807, range09223372036854775807) (memalloc.nim:353) by 0x10CED3: nimNewObj (arc.nim:86) by 0x10C29C: _ZN8sysFatal8sysFatalE8typeDescIN6system11IndexDefectEE4sinkI6stringE (fatal.nim:54) by 0x10C29C: raiseIndexError2 (chcks.nim:26) by 0x114260: NimMainModule (temp.nim:3) by 0x1145DE: NimMainInner (excpt.nim:439) by 0x1145F5: NimMain (excpt.nim:444) by 0x11461B: main (excpt.nim:451) 8,192 bytes in 1 blocks are still reachable in loss record 4 of 5 at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x109E41: system::alloc0Impl(range09223372036854775807) (malloc.nim:11) by 0x10A2F4: system::init(var) (cellsets.nim:92) by 0x10C8D6: nimRawDispose (arc.nim:160) by 0x10C991: nimDestroyAndDispose (arc.nim:180) by 0x10CCE1: FrameState::eqcopy_(var >, ref, bool) (excpt.nim:89) by 0x114539: popCurrentException (excpt.nim:89) by 0x114539: NimMainModule (temp.nim:6) by 0x1145DE: NimMainInner (excpt.nim:439) by 0x1145F5: NimMain (excpt.nim:444) 16,384 bytes in 1 blocks are still reachable in loss record 5 of 5 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x109E18: system::allocImpl(range09223372036854775807) (malloc.nim:5) by 0x10EFAC: init::init(var > >, int) (cellseqs_v2.nim:39) by 0x10B6FC: system::registerCycle(ptr, ptr) (orc.nim:409) by 0x10B846: system::rememberCycle(bool, ptr, ptr) (orc.nim:472) by 0x113476: nimDecRefIsLastCyclicDyn (orc.nim:483) by 0x113476: system::eqdestroy_(var >) (temp.nim:4) by 0x114510: NimMainModule (temp.nim:4) by 0x1145DE: NimMainInner (excpt.nim:439) by 0x1145F5: NimMain (excpt.nim:444) ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0) ```

IR

Compiled filesize 399.02 Kb (408,600 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #include # define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); # define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); # define nimln_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__5ppf27xNiC9aiXSPX0PMgHg tySequence__5ppf27xNiC9aiXSPX0PMgHg; typedef struct tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content; typedef struct tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw; typedef struct tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 {void* destructor; NI size; NI align; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload {NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 {NI len; NimStrPayload* p; }; struct tySequence__5ppf27xNiC9aiXSPX0PMgHg { NI len; tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content* p; }; struct Exception { RootObj Sup;Exception* parent; NCSTRING name; NimStringV2 message; tySequence__5ppf27xNiC9aiXSPX0PMgHg trace; Exception* up; }; struct tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; #ifndef tySequence__qwqHTkRvwhrRyENtudHQ7g_Content_PP #define tySequence__qwqHTkRvwhrRyENtudHQ7g_Content_PP struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE];}; #endif struct tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ {NCSTRING procname; NI line; NCSTRING filename; }; #ifndef tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content_PP #define tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content_PP struct tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content { NI cap; tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ data[SEQ_DECL_SIZE];}; #endif N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap, NI elemSize, NI elemAlign); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n); N_LIB_PRIVATE N_NIMCALL(void, _ZN3at_10eqdestroy_E3varI3seqI3intEE)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest); static N_INLINE(NIM_BOOL, isObj)(TNimTypeV2* obj, NCSTRING subclass); static N_INLINE(NIM_BOOL, _ZN6system8endsWithE7cstring7cstring)(NCSTRING s, NCSTRING suffix); static N_INLINE(NI, nimCStrLen)(NCSTRING a); N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void); static N_INLINE(void, nimFrame)(TFrame* s); N_LIB_PRIVATE N_NOINLINE(void, _ZN6system21callDepthLimitReachedE)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool)(Exception** dest, Exception* src, NIM_BOOL cyclic); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args, NI argsLen_0); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3varI3refIN6system6DefectEEE)(tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw** dest); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_DatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern TFrame* framePtr__system_u4316; extern Exception* currException__system_u4318; extern NIM_BOOL nimInErrorMode__system_u4667; #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" static N_INLINE(NI, nimCStrLen)(NCSTRING a) { #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" NI result; size_t T1_; result = (NI)0; #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" T1_ = (size_t)0; T1_ = strlen(a); result = ((NI) (T1_)); return result;} #line 549 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, nimFrame)(TFrame* s) { #line 550 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" { #line 550 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" if (!(framePtr__system_u4316 == ((TFrame*) NIM_NIL))) goto LA3_; #line 551 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 551 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).calldepth = ((NI16) 0); } goto LA1_; LA3_: ; { #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).calldepth = (NI16)((*framePtr__system_u4316).calldepth + ((NI16) 1)); } LA1_: ; #line 556 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 556 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).prev = framePtr__system_u4316; #line 557 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 557 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" framePtr__system_u4316 = s; #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" { #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" if (!((*s).calldepth == ((NI16) 2000))) goto LA8_; #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN6system21callDepthLimitReachedE(); } LA8_: ; } #line 99 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, popFrame)(void) { #line 100 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 100 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" framePtr__system_u4316 = (*framePtr__system_u4316).prev;} #line 234 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" static N_INLINE(NIM_BOOL, _ZN6system8endsWithE7cstring7cstring)(NCSTRING s, NCSTRING suffix) { #line 234 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NIM_BOOL result; #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NI sLen; #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NI suffixLen; nimfr_("endsWith", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim");{ result = (NIM_BOOL)0; #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" sLen = (s ? nimCStrLen(s) : 0); #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" suffixLen = (suffix ? nimCStrLen(suffix) : 0); #line 239 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" { NI TM__h69aKLv9bAieBdiFzvDngbMw_2; int T5_; #line 239 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" if (!(suffixLen <= sLen)) goto LA3_; #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" if (nimSubInt(sLen, suffixLen, &TM__h69aKLv9bAieBdiFzvDngbMw_2)) { raiseOverflow(); goto BeforeRet_;}; #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" T5_ = (int)0; T5_ = memcmp(((NCSTRING) ((&s[(NI)(TM__h69aKLv9bAieBdiFzvDngbMw_2)]))), suffix, ((size_t) (suffixLen))); result = (T5_ == ((NI32) 0)); } LA3_: ; }BeforeRet_: ; popFrame(); return result;} #line 242 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" static N_INLINE(NIM_BOOL, isObj)(TNimTypeV2* obj, NCSTRING subclass) { #line 242 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NIM_BOOL result; nimfr_("isObj", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim"); result = (NIM_BOOL)0; #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" result = _ZN6system8endsWithE7cstring7cstring((*obj).name, subclass); popFrame(); return result;} #line 2410 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" static N_INLINE(Exception*, nimBorrowCurrentException)(void) { #line 2410 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim"); result = NIM_NIL; #line 2413 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" #line 2413 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" result = currException__system_u4318; popFrame(); return result;} #line 2406 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" static N_INLINE(Exception*, getCurrentException)(void) { #line 2406 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim"); result = NIM_NIL; #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&result, currException__system_u4318, NIM_FALSE); popFrame(); return result;} #line 137 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, popCurrentException)(void) { #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&currException__system_u4318, (*currException__system_u4318).up, NIM_FALSE); } #line 423 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { #line 423 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" NIM_BOOL* result; result = (NIM_BOOL*)0; #line 424 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 424 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" result = (&nimInErrorMode__system_u4667); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_DatInit000(); atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_Init000(); PreMainInner(); } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { PreMain(); NimMainInner(); } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI) 0); #line 3 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" if (((NI) 1) < 0 || ((NI) 1) >= a__temp_u5.len){ raiseIndexError2(((NI) 1),a__temp_u5.len-1); goto LA1_;} #line 3 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.p->data[((NI) 1)] = ((NI) 0); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" _ZN3at_10eqdestroy_E3varI3seqI3intEE((&a__temp_u5)); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObj(nimBorrowCurrentException()->Sup.m_type, "|Defect|Exception|RootObj|")) { #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw*) (T6_)); #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" _ZN6system10eqdestroy_E3varI3refIN6system6DefectEEE(&err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T15:41:01
  • Finished 2024-06-15T15:41:02
  • Duration 1 minutes

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
1.4.8 :-1: FAIL

Output

``` Error: Command failed: nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/.choosenim/toolchains/nim-1.4.8/lib/system/bitmasks.nim(13, 3) Error: redefinition of 'PageShift'; previous declaration here: /home/runner/.choosenim/toolchains/nim-1.4.8/lib/system/bitmasks.nim(13, 3) ```

IR

Compiled filesize 399.02 Kb (408,600 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #include # define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); # define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); # define nimln_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__5ppf27xNiC9aiXSPX0PMgHg tySequence__5ppf27xNiC9aiXSPX0PMgHg; typedef struct tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content; typedef struct tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw; typedef struct tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 {void* destructor; NI size; NI align; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload {NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 {NI len; NimStrPayload* p; }; struct tySequence__5ppf27xNiC9aiXSPX0PMgHg { NI len; tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content* p; }; struct Exception { RootObj Sup;Exception* parent; NCSTRING name; NimStringV2 message; tySequence__5ppf27xNiC9aiXSPX0PMgHg trace; Exception* up; }; struct tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; #ifndef tySequence__qwqHTkRvwhrRyENtudHQ7g_Content_PP #define tySequence__qwqHTkRvwhrRyENtudHQ7g_Content_PP struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE];}; #endif struct tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ {NCSTRING procname; NI line; NCSTRING filename; }; #ifndef tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content_PP #define tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content_PP struct tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content { NI cap; tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ data[SEQ_DECL_SIZE];}; #endif N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap, NI elemSize, NI elemAlign); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n); N_LIB_PRIVATE N_NIMCALL(void, _ZN3at_10eqdestroy_E3varI3seqI3intEE)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest); static N_INLINE(NIM_BOOL, isObj)(TNimTypeV2* obj, NCSTRING subclass); static N_INLINE(NIM_BOOL, _ZN6system8endsWithE7cstring7cstring)(NCSTRING s, NCSTRING suffix); static N_INLINE(NI, nimCStrLen)(NCSTRING a); N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void); static N_INLINE(void, nimFrame)(TFrame* s); N_LIB_PRIVATE N_NOINLINE(void, _ZN6system21callDepthLimitReachedE)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool)(Exception** dest, Exception* src, NIM_BOOL cyclic); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args, NI argsLen_0); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3varI3refIN6system6DefectEEE)(tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw** dest); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_DatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern TFrame* framePtr__system_u4316; extern Exception* currException__system_u4318; extern NIM_BOOL nimInErrorMode__system_u4667; #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" static N_INLINE(NI, nimCStrLen)(NCSTRING a) { #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" NI result; size_t T1_; result = (NI)0; #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" T1_ = (size_t)0; T1_ = strlen(a); result = ((NI) (T1_)); return result;} #line 549 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, nimFrame)(TFrame* s) { #line 550 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" { #line 550 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" if (!(framePtr__system_u4316 == ((TFrame*) NIM_NIL))) goto LA3_; #line 551 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 551 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).calldepth = ((NI16) 0); } goto LA1_; LA3_: ; { #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).calldepth = (NI16)((*framePtr__system_u4316).calldepth + ((NI16) 1)); } LA1_: ; #line 556 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 556 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).prev = framePtr__system_u4316; #line 557 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 557 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" framePtr__system_u4316 = s; #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" { #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" if (!((*s).calldepth == ((NI16) 2000))) goto LA8_; #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN6system21callDepthLimitReachedE(); } LA8_: ; } #line 99 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, popFrame)(void) { #line 100 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 100 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" framePtr__system_u4316 = (*framePtr__system_u4316).prev;} #line 234 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" static N_INLINE(NIM_BOOL, _ZN6system8endsWithE7cstring7cstring)(NCSTRING s, NCSTRING suffix) { #line 234 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NIM_BOOL result; #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NI sLen; #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NI suffixLen; nimfr_("endsWith", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim");{ result = (NIM_BOOL)0; #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" sLen = (s ? nimCStrLen(s) : 0); #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" suffixLen = (suffix ? nimCStrLen(suffix) : 0); #line 239 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" { NI TM__h69aKLv9bAieBdiFzvDngbMw_2; int T5_; #line 239 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" if (!(suffixLen <= sLen)) goto LA3_; #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" if (nimSubInt(sLen, suffixLen, &TM__h69aKLv9bAieBdiFzvDngbMw_2)) { raiseOverflow(); goto BeforeRet_;}; #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" T5_ = (int)0; T5_ = memcmp(((NCSTRING) ((&s[(NI)(TM__h69aKLv9bAieBdiFzvDngbMw_2)]))), suffix, ((size_t) (suffixLen))); result = (T5_ == ((NI32) 0)); } LA3_: ; }BeforeRet_: ; popFrame(); return result;} #line 242 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" static N_INLINE(NIM_BOOL, isObj)(TNimTypeV2* obj, NCSTRING subclass) { #line 242 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NIM_BOOL result; nimfr_("isObj", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim"); result = (NIM_BOOL)0; #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" result = _ZN6system8endsWithE7cstring7cstring((*obj).name, subclass); popFrame(); return result;} #line 2410 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" static N_INLINE(Exception*, nimBorrowCurrentException)(void) { #line 2410 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim"); result = NIM_NIL; #line 2413 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" #line 2413 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" result = currException__system_u4318; popFrame(); return result;} #line 2406 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" static N_INLINE(Exception*, getCurrentException)(void) { #line 2406 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim"); result = NIM_NIL; #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&result, currException__system_u4318, NIM_FALSE); popFrame(); return result;} #line 137 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, popCurrentException)(void) { #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&currException__system_u4318, (*currException__system_u4318).up, NIM_FALSE); } #line 423 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { #line 423 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" NIM_BOOL* result; result = (NIM_BOOL*)0; #line 424 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 424 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" result = (&nimInErrorMode__system_u4667); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_DatInit000(); atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_Init000(); PreMainInner(); } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { PreMain(); NimMainInner(); } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI) 0); #line 3 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" if (((NI) 1) < 0 || ((NI) 1) >= a__temp_u5.len){ raiseIndexError2(((NI) 1),a__temp_u5.len-1); goto LA1_;} #line 3 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.p->data[((NI) 1)] = ((NI) 0); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" _ZN3at_10eqdestroy_E3varI3seqI3intEE((&a__temp_u5)); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObj(nimBorrowCurrentException()->Sup.m_type, "|Defect|Exception|RootObj|")) { #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw*) (T6_)); #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" _ZN6system10eqdestroy_E3varI3refIN6system6DefectEEE(&err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T15:41:04
  • Finished 2024-06-15T15:41:04
  • Duration

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
1.2.18 :-1: FAIL

Output

``` Error: Command failed: nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim(2, 11) template/generic instantiation of `setLen` from here /home/runner/.choosenim/toolchains/nim-1.2.18/lib/system/seqs_v2.nim(116, 13) template/generic instantiation of `shrink` from here /home/runner/.choosenim/toolchains/nim-1.2.18/lib/system/seqs_v2.nim(78, 15) template/generic instantiation of `sysAssert` from here /home/runner/.choosenim/toolchains/nim-1.2.18/lib/system.nim(1173, 7) Error: undeclared identifier: 'cstderr' ```

IR

Compiled filesize 399.02 Kb (408,600 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #include # define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); # define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); # define nimln_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__5ppf27xNiC9aiXSPX0PMgHg tySequence__5ppf27xNiC9aiXSPX0PMgHg; typedef struct tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content; typedef struct tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw; typedef struct tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 {void* destructor; NI size; NI align; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload {NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 {NI len; NimStrPayload* p; }; struct tySequence__5ppf27xNiC9aiXSPX0PMgHg { NI len; tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content* p; }; struct Exception { RootObj Sup;Exception* parent; NCSTRING name; NimStringV2 message; tySequence__5ppf27xNiC9aiXSPX0PMgHg trace; Exception* up; }; struct tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; #ifndef tySequence__qwqHTkRvwhrRyENtudHQ7g_Content_PP #define tySequence__qwqHTkRvwhrRyENtudHQ7g_Content_PP struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE];}; #endif struct tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ {NCSTRING procname; NI line; NCSTRING filename; }; #ifndef tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content_PP #define tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content_PP struct tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content { NI cap; tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ data[SEQ_DECL_SIZE];}; #endif N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap, NI elemSize, NI elemAlign); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n); N_LIB_PRIVATE N_NIMCALL(void, _ZN3at_10eqdestroy_E3varI3seqI3intEE)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest); static N_INLINE(NIM_BOOL, isObj)(TNimTypeV2* obj, NCSTRING subclass); static N_INLINE(NIM_BOOL, _ZN6system8endsWithE7cstring7cstring)(NCSTRING s, NCSTRING suffix); static N_INLINE(NI, nimCStrLen)(NCSTRING a); N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void); static N_INLINE(void, nimFrame)(TFrame* s); N_LIB_PRIVATE N_NOINLINE(void, _ZN6system21callDepthLimitReachedE)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool)(Exception** dest, Exception* src, NIM_BOOL cyclic); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args, NI argsLen_0); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3varI3refIN6system6DefectEEE)(tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw** dest); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_DatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern TFrame* framePtr__system_u4316; extern Exception* currException__system_u4318; extern NIM_BOOL nimInErrorMode__system_u4667; #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" static N_INLINE(NI, nimCStrLen)(NCSTRING a) { #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" NI result; size_t T1_; result = (NI)0; #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" T1_ = (size_t)0; T1_ = strlen(a); result = ((NI) (T1_)); return result;} #line 549 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, nimFrame)(TFrame* s) { #line 550 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" { #line 550 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" if (!(framePtr__system_u4316 == ((TFrame*) NIM_NIL))) goto LA3_; #line 551 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 551 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).calldepth = ((NI16) 0); } goto LA1_; LA3_: ; { #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).calldepth = (NI16)((*framePtr__system_u4316).calldepth + ((NI16) 1)); } LA1_: ; #line 556 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 556 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).prev = framePtr__system_u4316; #line 557 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 557 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" framePtr__system_u4316 = s; #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" { #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" if (!((*s).calldepth == ((NI16) 2000))) goto LA8_; #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN6system21callDepthLimitReachedE(); } LA8_: ; } #line 99 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, popFrame)(void) { #line 100 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 100 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" framePtr__system_u4316 = (*framePtr__system_u4316).prev;} #line 234 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" static N_INLINE(NIM_BOOL, _ZN6system8endsWithE7cstring7cstring)(NCSTRING s, NCSTRING suffix) { #line 234 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NIM_BOOL result; #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NI sLen; #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NI suffixLen; nimfr_("endsWith", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim");{ result = (NIM_BOOL)0; #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" sLen = (s ? nimCStrLen(s) : 0); #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" suffixLen = (suffix ? nimCStrLen(suffix) : 0); #line 239 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" { NI TM__h69aKLv9bAieBdiFzvDngbMw_2; int T5_; #line 239 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" if (!(suffixLen <= sLen)) goto LA3_; #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" if (nimSubInt(sLen, suffixLen, &TM__h69aKLv9bAieBdiFzvDngbMw_2)) { raiseOverflow(); goto BeforeRet_;}; #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" T5_ = (int)0; T5_ = memcmp(((NCSTRING) ((&s[(NI)(TM__h69aKLv9bAieBdiFzvDngbMw_2)]))), suffix, ((size_t) (suffixLen))); result = (T5_ == ((NI32) 0)); } LA3_: ; }BeforeRet_: ; popFrame(); return result;} #line 242 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" static N_INLINE(NIM_BOOL, isObj)(TNimTypeV2* obj, NCSTRING subclass) { #line 242 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NIM_BOOL result; nimfr_("isObj", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim"); result = (NIM_BOOL)0; #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" result = _ZN6system8endsWithE7cstring7cstring((*obj).name, subclass); popFrame(); return result;} #line 2410 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" static N_INLINE(Exception*, nimBorrowCurrentException)(void) { #line 2410 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim"); result = NIM_NIL; #line 2413 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" #line 2413 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" result = currException__system_u4318; popFrame(); return result;} #line 2406 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" static N_INLINE(Exception*, getCurrentException)(void) { #line 2406 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim"); result = NIM_NIL; #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&result, currException__system_u4318, NIM_FALSE); popFrame(); return result;} #line 137 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, popCurrentException)(void) { #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&currException__system_u4318, (*currException__system_u4318).up, NIM_FALSE); } #line 423 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { #line 423 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" NIM_BOOL* result; result = (NIM_BOOL*)0; #line 424 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 424 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" result = (&nimInErrorMode__system_u4667); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_DatInit000(); atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_Init000(); PreMainInner(); } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { PreMain(); NimMainInner(); } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI) 0); #line 3 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" if (((NI) 1) < 0 || ((NI) 1) >= a__temp_u5.len){ raiseIndexError2(((NI) 1),a__temp_u5.len-1); goto LA1_;} #line 3 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.p->data[((NI) 1)] = ((NI) 0); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" _ZN3at_10eqdestroy_E3varI3seqI3intEE((&a__temp_u5)); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObj(nimBorrowCurrentException()->Sup.m_type, "|Defect|Exception|RootObj|")) { #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw*) (T6_)); #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" _ZN6system10eqdestroy_E3varI3refIN6system6DefectEEE(&err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T15:41:06
  • Finished 2024-06-15T15:41:06
  • Duration

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
1.0.10 :-1: FAIL

Output

``` Error: Command failed: nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp command line(1, 2) Error: 'none', 'boehm' or 'refc' expected, but 'orc' found ```

IR

Compiled filesize 399.02 Kb (408,600 bytes) ```cpp #define NIM_INTBITS 64 #include "nimbase.h" #include # define nimfr_(proc, file) \ TFrame FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_); # define nimfrs_(proc, file, slots, length) \ struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \ FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_); # define nimln_(n, file) \ FR_.line = n; FR_.filename = file; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g; typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content; typedef struct TNimTypeV2 TNimTypeV2; typedef struct Exception Exception; typedef struct RootObj RootObj; typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tySequence__5ppf27xNiC9aiXSPX0PMgHg tySequence__5ppf27xNiC9aiXSPX0PMgHg; typedef struct tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content; typedef struct tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw; typedef struct tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ; struct tySequence__qwqHTkRvwhrRyENtudHQ7g { NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p; }; struct TNimTypeV2 {void* destructor; NI size; NI align; NCSTRING name; void* traceImpl; void* typeInfoV1; NI flags; }; struct RootObj {TNimTypeV2* m_type;}; struct NimStrPayload {NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 {NI len; NimStrPayload* p; }; struct tySequence__5ppf27xNiC9aiXSPX0PMgHg { NI len; tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content* p; }; struct Exception { RootObj Sup;Exception* parent; NCSTRING name; NimStringV2 message; tySequence__5ppf27xNiC9aiXSPX0PMgHg trace; Exception* up; }; struct tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw { Exception Sup;}; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; #ifndef tySequence__qwqHTkRvwhrRyENtudHQ7g_Content_PP #define tySequence__qwqHTkRvwhrRyENtudHQ7g_Content_PP struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE];}; #endif struct tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ {NCSTRING procname; NI line; NCSTRING filename; }; #ifndef tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content_PP #define tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content_PP struct tySequence__5ppf27xNiC9aiXSPX0PMgHg_Content { NI cap; tyObject_StackTraceEntry__bbVZPBZtf49abwlWtZZfyvQ data[SEQ_DECL_SIZE];}; #endif N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap, NI elemSize, NI elemAlign); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n); N_LIB_PRIVATE N_NIMCALL(void, _ZN3at_10eqdestroy_E3varI3seqI3intEE)(tySequence__qwqHTkRvwhrRyENtudHQ7g* dest); static N_INLINE(NIM_BOOL, isObj)(TNimTypeV2* obj, NCSTRING subclass); static N_INLINE(NIM_BOOL, _ZN6system8endsWithE7cstring7cstring)(NCSTRING s, NCSTRING suffix); static N_INLINE(NI, nimCStrLen)(NCSTRING a); N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void); static N_INLINE(void, nimFrame)(TFrame* s); N_LIB_PRIVATE N_NOINLINE(void, _ZN6system21callDepthLimitReachedE)(void); static N_INLINE(void, popFrame)(void); static N_INLINE(Exception*, nimBorrowCurrentException)(void); static N_INLINE(Exception*, getCurrentException)(void); N_LIB_PRIVATE N_NIMCALL(void, _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool)(Exception** dest, Exception* src, NIM_BOOL cyclic); N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args, NI argsLen_0); N_LIB_PRIVATE N_NIMCALL(void, _ZN6system10eqdestroy_E3varI3refIN6system6DefectEEE)(tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw** dest); static N_INLINE(void, popCurrentException)(void); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_DatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); N_LIB_PRIVATE tySequence__qwqHTkRvwhrRyENtudHQ7g a__temp_u5; extern TFrame* framePtr__system_u4316; extern Exception* currException__system_u4318; extern NIM_BOOL nimInErrorMode__system_u4667; #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" static N_INLINE(NI, nimCStrLen)(NCSTRING a) { #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" NI result; size_t T1_; result = (NI)0; #line 45 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" #line 47 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/memory.nim" T1_ = (size_t)0; T1_ = strlen(a); result = ((NI) (T1_)); return result;} #line 549 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, nimFrame)(TFrame* s) { #line 550 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" { #line 550 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" if (!(framePtr__system_u4316 == ((TFrame*) NIM_NIL))) goto LA3_; #line 551 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 551 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).calldepth = ((NI16) 0); } goto LA1_; LA3_: ; { #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 554 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).calldepth = (NI16)((*framePtr__system_u4316).calldepth + ((NI16) 1)); } LA1_: ; #line 556 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 556 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" (*s).prev = framePtr__system_u4316; #line 557 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 557 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" framePtr__system_u4316 = s; #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" { #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" if (!((*s).calldepth == ((NI16) 2000))) goto LA8_; #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 558 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN6system21callDepthLimitReachedE(); } LA8_: ; } #line 99 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, popFrame)(void) { #line 100 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 100 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" framePtr__system_u4316 = (*framePtr__system_u4316).prev;} #line 234 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" static N_INLINE(NIM_BOOL, _ZN6system8endsWithE7cstring7cstring)(NCSTRING s, NCSTRING suffix) { #line 234 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NIM_BOOL result; #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NI sLen; #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NI suffixLen; nimfr_("endsWith", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim");{ result = (NIM_BOOL)0; #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 236 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" sLen = (s ? nimCStrLen(s) : 0); #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 237 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" suffixLen = (suffix ? nimCStrLen(suffix) : 0); #line 239 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" { NI TM__h69aKLv9bAieBdiFzvDngbMw_2; int T5_; #line 239 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" if (!(suffixLen <= sLen)) goto LA3_; #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" if (nimSubInt(sLen, suffixLen, &TM__h69aKLv9bAieBdiFzvDngbMw_2)) { raiseOverflow(); goto BeforeRet_;}; #line 240 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" T5_ = (int)0; T5_ = memcmp(((NCSTRING) ((&s[(NI)(TM__h69aKLv9bAieBdiFzvDngbMw_2)]))), suffix, ((size_t) (suffixLen))); result = (T5_ == ((NI32) 0)); } LA3_: ; }BeforeRet_: ; popFrame(); return result;} #line 242 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" static N_INLINE(NIM_BOOL, isObj)(TNimTypeV2* obj, NCSTRING subclass) { #line 242 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" NIM_BOOL result; nimfr_("isObj", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim"); result = (NIM_BOOL)0; #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" #line 243 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/arc.nim" result = _ZN6system8endsWithE7cstring7cstring((*obj).name, subclass); popFrame(); return result;} #line 2410 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" static N_INLINE(Exception*, nimBorrowCurrentException)(void) { #line 2410 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" Exception* result; nimfr_("nimBorrowCurrentException", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim"); result = NIM_NIL; #line 2413 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" #line 2413 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" result = currException__system_u4318; popFrame(); return result;} #line 2406 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" static N_INLINE(Exception*, getCurrentException)(void) { #line 2406 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim" Exception* result; nimfr_("getCurrentException", "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system.nim"); result = NIM_NIL; #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&result, currException__system_u4318, NIM_FALSE); popFrame(); return result;} #line 137 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(void, popCurrentException)(void) { #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 89 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" _ZN10FrameState7eqcopy_E3varI3refIN6system9ExceptionEEE3refIN6system9ExceptionEE4bool(&currException__system_u4318, (*currException__system_u4318).up, NIM_FALSE); } #line 423 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { #line 423 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" NIM_BOOL* result; result = (NIM_BOOL*)0; #line 424 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" #line 424 "/home/runner/.choosenim/toolchains/nim-1.6.20/lib/system/excpt.nim" result = (&nimInErrorMode__system_u4667); return result;} N_LIB_PRIVATE void PreMainInner(void) { } N_LIB_PRIVATE int cmdCount; N_LIB_PRIVATE char** cmdLine; N_LIB_PRIVATE char** gEnv; N_LIB_PRIVATE void PreMain(void) { atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_DatInit000(); atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot20atslibatssystemdotnim_Init000(); PreMainInner(); } N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) { NimMainModule(); } N_CDECL(void, NimMain)(void) { PreMain(); NimMainInner(); } int main(int argc, char** args, char** env) { cmdLine = args; cmdCount = argc; gEnv = env; NimMain(); return nim_program_result; } N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) { #line 999999 "generated_not_to_break_here" { NIM_BOOL* nimErr_; nimfr_("temp", "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim");nimErr_ = nimErrorFlag(); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.len = 1; a__temp_u5.p = (tySequence__qwqHTkRvwhrRyENtudHQ7g_Content*) newSeqPayload(1, sizeof(NI), NIM_ALIGNOF(NI)); a__temp_u5.p->data[0] = ((NI) 0); #line 3 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" if (((NI) 1) < 0 || ((NI) 1) >= a__temp_u5.len){ raiseIndexError2(((NI) 1),a__temp_u5.len-1); goto LA1_;} #line 3 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" a__temp_u5.p->data[((NI) 1)] = ((NI) 0); #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 2 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" _ZN3at_10eqdestroy_E3varI3seqI3intEE((&a__temp_u5)); if (NIM_UNLIKELY(*nimErr_)) { LA1_:; if (isObj(nimBorrowCurrentException()->Sup.m_type, "|Defect|Exception|RootObj|")) { #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw* err; Exception* T6_; tyArray__nHXaesL0DJZHyVS07ARPRA T7_; *nimErr_ = NIM_FALSE; err = NIM_NIL; #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T6_ = NIM_NIL; T6_ = getCurrentException(); err = ((tyObject_Defect__3KdVAGFIYlSrkdFO3qG1gw*) (T6_)); #line 5 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" T7_[0] = (*err).Sup.message; echoBinSafe(T7_, 1); { LA5_:; } { #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" #line 4 "/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim" _ZN6system10eqdestroy_E3varI3refIN6system6DefectEEE(&err); } if (NIM_UNLIKELY(*nimErr_)) goto LA3_; popCurrentException(); LA3_:; } } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; BeforeRet_: ; nimTestErrorFlag(); popFrame();} } ```

Stats

  • Started 2024-06-15T15:41:08
  • Finished 2024-06-15T15:41:08
  • Duration

AST

```nim nnkStmtList.newTree( nnkTryStmt.newTree( nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newEmptyNode(), nnkPrefix.newTree( newIdentNode("@"), nnkBracket.newTree( newLit(0) ) ) ) ), nnkAsgn.newTree( nnkBracketExpr.newTree( newIdentNode("a"), newLit(1) ), newLit(0) ) ), nnkExceptBranch.newTree( nnkInfix.newTree( newIdentNode("as"), newIdentNode("Defect"), newIdentNode("err") ), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("err"), newIdentNode("msg") ) ) ) ) ) ) ```
Stats
  • GCC 11.4.0
  • Clang 14.0.0
  • NodeJS 20.3
  • Created 2024-06-15T15:40:16Z
  • Comments 5
  • Commands nim c --gc:orc -d:useMalloc -d:nimArcDebug -d:nimArcIds -d:nimAllocPagesViaMalloc -d:useSysAssert -d:useGcAssert -d:nimLeakDetector --debugger:native --debuginfo:on -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield --out:/home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp.nim && valgrind /home/runner/work/nimrun-action-minefield/nimrun-action-minefield/temp

:robot: Bug found in 33 minutes bisecting 8 commits at 0 commits per second