it works fine in an x86_64 macos running in kvm on linux.
the sigsegv at the end could be a stack overflow while printing the backtrace, but does that really eat more stack than the GC?.
loading file: source/types.l
loading file: source/selector.l
loading file: source/printing.l
ERROR:
set-string-at: arg 'string' is not of type <string>
ABORTED
0: require.0+127
callee: Expr<require (path.2+0)>
arg 0: source/printing.l
1: apply
callee: Expr<require (path.2+0)>
arg 0: source/printing.l
2: Fixed<.let>
callee: Fixed<.let>
arg 0: Env< Lv2,Off2,#1
arg 1: ((list.2+1 *load-history*.0+125))
arg 2: (Fixed<.while> (Fixed<.and> list.2+1 (not.0+55 (=.0+41 path.2+0 (car.0+100 list.2+1)))) (Fixed<.set> list.2+1 (cdr.0+99 list.2+1)))
arg 3: (Fixed<.if> (not.0+55 list.2+1) (load.0+67 path.2+0))
3: apply
callee: .let
arg 0: Env< Lv2,Off2,#1
arg 1: ((list.2+1 *load-history*.0+125))
arg 2: (Fixed<.while> (Fixed<.and> list.2+1 (not.0+55 (=.0+41 path.2+0 (car.0+100 list.2+1)))) (Fixed<.set> list.2+1 (cdr.0+99 list.2+1)))
arg 3: (Fixed<.if> (not.0+55 list.2+1) (load.0+67 path.2+0))
4: Fixed<.if>
callee: Fixed<.if>
arg 0: (not.0+55 list.2+1)
arg 1: (load.0+67 path.2+0)
5: apply
callee: .if
arg 0: (not.0+55 list.2+1)
arg 1: (load.0+67 path.2+0)
6: load.0+67
callee: Expr<? (path.2+0)>
arg 0: source/printing.l
7: apply
callee: Expr<? (path.2+0)>
arg 0: source/printing.l
8: primitive/load.0+126
callee: .load
arg 0: source/printing.l
9: apply
callee: .load
arg 0: source/printing.l
10: add-method.0+352
callee: [instof:21]
arg 0: [instof:21]
arg 1: Record<type>
arg 2: [instof:0]
arg 3: [instof:0]
11: apply
callee: [instof:21]
arg 0: [instof:21]
arg 1: Record<type>
arg 2: [instof:0]
arg 3: [instof:0]
12: apply
callee: Expr<? (self.2+0 . arguments.2+1)>
arg 0: [instof:21]
arg 1: [instof:21]
arg 2: Record<type>
arg 3: [instof:0]
arg 4: [instof:0]
13: apply.0+77
callee: .apply
arg 0: Expr<<selector>.add-method (self.2+0 [instof:0].2+1 args.2+2 [instof:0].2+3)>
arg 1: [instof:0]
14: apply
callee: .apply
arg 0: Expr<<selector>.add-method (self.2+0 [instof:0].2+1 args.2+2 [instof:0].2+3)>
arg 1: [instof:0]
15: apply
callee: Expr<<selector>.add-method (self.2+0 [instof:0].2+1 args.2+2 [instof:0].2+3)>
arg 0: [instof:21]
arg 1: Record<type>
arg 2: [instof:0]
arg 3: [instof:0]
16: <selector>-add-method.0+350
callee: Expr<<selector>-add-method (self.2+0 [instof:0].2+1 method.2+2)>
arg 0: self.2+0
arg 1: [instof:0].2+1
arg 2: (eval.0+65 (cons.0+96 (Fixed<.quote> lambda) (cons.0+96 args.2+2 (cons.0+96 (cons.0+96 (Fixed<.quote> with-instance-accessors) (cons.0+96 (Fixed<.quote> self) (cons.0+96 [instof:0].2+1 [instof:0].2+3))) (Fixed<.quote> ())))))
17: eval.0+65
callee: .eval
arg 0: [instof:0]
18: apply
callee: .eval
arg 0: [instof:0]
19: expand
expr: [instof:0]
20: expand
expr: [instof:0]
21: apply
callee: Expr<with-instance-accessors ([instof:0].2+0 [instof:0].2+1 type-name.2+2 . [instof:0].2+3)>
arg 0: [instof:0]
arg 1: self
arg 2: Record<type>
arg 3: [instof:0]
22: Fixed<.let>
callee: Fixed<.let>
arg 0: Env< Lv2,Off7,#2
arg 1: ((accessors.2+4 ()) (super.2+5 (eval.0+65 type-name.2+2)))
arg 2: (Fixed<.while> (=.0+41 <record>.0+229 (type-of.0+38 super.2+5)) (Fixed<.let> Env< Lv2,Off8,#1 ((_list_.2+6 (make-instance-accessors.0+337 [instof:0].2+1 (oop-at.0+31 super.2+5 1) (oop-at.0+31 super.2+5 3)))) (Fixed<.while> _list_.2+6 (Fixed<.let> Env< Lv2,Off8,#1 ((accessor.2+7 (car.0+100 _list_.2+6))) (Fixed<.set> accessors.2+4 (cons.0+96 accessor.2+7 accessors.2+4))) (Fixed<.set> _list_.2+6 (cdr.0+99 _list_.2+6)))) (Fixed<.set> super.2+5 (oop-at.0+31 super.2+5 2)))
arg 3: (cons.0+96 (Fixed<.quote> with-forms) (cons.0+96 accessors.2+4 [instof:0].2+3))
23: apply
callee: .let
arg 0: Env< Lv2,Off7,#2
arg 1: ((accessors.2+4 ()) (super.2+5 (eval.0+65 type-name.2+2)))
arg 2: (Fixed<.while> (=.0+41 <record>.0+229 (type-of.0+38 super.2+5)) (Fixed<.let> Env< Lv2,Off8,#1 ((_list_.2+6 (make-instance-accessors.0+337 [instof:0].2+1 (oop-at.0+31 super.2+5 1) (oop-at.0+31 super.2+5 3)))) (Fixed<.while> _list_.2+6 (Fixed<.let> Env< Lv2,Off8,#1 ((accessor.2+7 (car.0+100 _list_.2+6))) (Fixed<.set> accessors.2+4 (cons.0+96 accessor.2+7 accessors.2+4))) (Fixed<.set> _list_.2+6 (cdr.0+99 _list_.2+6)))) (Fixed<.set> super.2+5 (oop-at.0+31 super.2+5 2)))
arg 3: (cons.0+96 (Fixed<.quote> with-forms) (cons.0+96 accessors.2+4 [instof:0].2+3))
24: Fixed<.while>
callee: Fixed<.while>
arg 0: (=.0+41 <record>.0+229 (type-of.0+38 super.2+5))
arg 1: (Fixed<.let> Env< Lv2,Off8,#1 ((_list_.2+6 (make-instance-accessors.0+337 [instof:0].2+1 (oop-at.0+31 super.2+5 1) (oop-at.0+31 super.2+5 3)))) (Fixed<.while> _list_.2+6 (Fixed<.let> Env< Lv2,Off8,#1 ((accessor.2+7 (car.0+100 _list_.2+6))) (Fixed<.set> accessors.2+4 (cons.0+96 accessor.2+7 accessors.2+4))) (Fixed<.set> _list_.2+6 (cdr.0+99 _list_.2+6))))
arg 2: (Fixed<.set> super.2+5 (oop-at.0+31 super.2+5 2))
25: apply
callee: .while
arg 0: (=.0+41 <record>.0+229 (type-of.0+38 super.2+5))
arg 1: (Fixed<.let> Env< Lv2,Off8,#1 ((_list_.2+6 (make-instance-accessors.0+337 [instof:0].2+1 (oop-at.0+31 super.2+5 1) (oop-at.0+31 super.2+5 3)))) (Fixed<.while> _list_.2+6 (Fixed<.let> Env< Lv2,Off8,#1 ((accessor.2+7 (car.0+100 _list_.2+6))) (Fixed<.set> accessors.2+4 (cons.0+96 accessor.2+7 accessors.2+4))) (Fixed<.set> _list_.2+6 (cdr.0+99 _list_.2+6))))
arg 2: (Fixed<.set> super.2+5 (oop-at.0+31 super.2+5 2))
26: Fixed<.let>
callee: Fixed<.let>
arg 0: Env< Lv2,Off8,#1
arg 1: ((_list_.2+6 (make-instance-accessors.0+337 [instof:0].2+1 (oop-at.0+31 super.2+5 1) (oop-at.0+31 super.2+5 3))))
arg 2: (Fixed<.while> _list_.2+6 (Fixed<.let> Env< Lv2,Off8,#1 ((accessor.2+7 (car.0+100 _list_.2+6))) (Fixed<.set> accessors.2+4 (cons.0+96 accessor.2+7 accessors.2+4))) (Fixed<.set> _list_.2+6 (cdr.0+99 _list_.2+6)))
27: apply
callee: .let
arg 0: Env< Lv2,Off8,#1
arg 1: ((_list_.2+6 (make-instance-accessors.0+337 [instof:0].2+1 (oop-at.0+31 super.2+5 1) (oop-at.0+31 super.2+5 3))))
arg 2: (Fixed<.while> _list_.2+6 (Fixed<.let> Env< Lv2,Off8,#1 ((accessor.2+7 (car.0+100 _list_.2+6))) (Fixed<.set> accessors.2+4 (cons.0+96 accessor.2+7 accessors.2+4))) (Fixed<.set> _list_.2+6 (cdr.0+99 _list_.2+6)))
28: make-instance-accessors.0+337
callee: Expr<make-instance-accessors ([instof:0].2+0 type-name.2+1 slots.2+2)>
arg 0: self
arg 1: <type>
arg 2: (id [instof:0])
29: apply
callee: Expr<make-instance-accessors ([instof:0].2+0 type-name.2+1 slots.2+2)>
arg 0: self
arg 1: <type>
arg 2: (id [instof:0])
30: Fixed<.if>
callee: Fixed<.if>
arg 0: (pair?.0+35 slots.2+2)
arg 1: (Fixed<.let> Env< Lv2,Off3,#0 () (cons.0+96 (cons.0+96 (concat-symbols.0+211 [instof:0].2+0 (Fixed<.quote> .) (car.0+100 slots.2+2)) (cons.0+96 (Fixed<.quote> ()) (cons.0+96 (cons.0+96 (cons.0+96 (Fixed<.quote> [instof:0]) (Fixed<.quote> ())) (cons.0+96 (cons.0+96 (Fixed<.quote> quasiquote) (cons.0+96 (cons.0+96 (Fixed<.quote> slot-value) (cons.0+96 type-name.2+1 (cons.0+96 (car.0+100 slots.2+2) (cons.0+96 [instof:0].2+0 (Fixed<.quote> ()))))) (Fixed<.quote> ()))) (Fixed<.quote> ()))) (Fixed<.quote> ())))) (make-instance-accessors.0+337 [instof:0].2+0 type-name.2+1 (cdr.0+99 slots.2+2))))
31: apply
callee: .if
arg 0: (pair?.0+35 slots.2+2)
arg 1: (Fixed<.let> Env< Lv2,Off3,#0 () (cons.0+96 (cons.0+96 (concat-symbols.0+211 [instof:0].2+0 (Fixed<.quote> .) (car.0+100 slots.2+2)) (cons.0+96 (Fixed<.quote> ()) (cons.0+96 (cons.0+96 (cons.0+96 (Fixed<.quote> [instof:0]) (Fixed<.quote> ())) (cons.0+96 (cons.0+96 (Fixed<.quote> quasiquote) (cons.0+96 (cons.0+96 (Fixed<.quote> slot-value) (cons.0+96 type-name.2+1 (cons.0+96 (car.0+100 slots.2+2) (cons.0+96 [instof:0].2+0 (Fixed<.quote> ()))))) (Fixed<.quote> ()))) (Fixed<.quote> ()))) (Fixed<.quote> ())))) (make-instance-accessors.0+337 [instof:0].2+0 type-name.2+1 (cdr.0+99 slots.2+2))))
32: Fixed<.let>
callee: Fixed<.let>
arg 0: Env< Lv2,Off3,#0
arg 1: ()
arg 2: (cons.0+96 (cons.0+96 (concat-symbols.0+211 [instof:0].2+0 (Fixed<.quote> .) (car.0+100 slots.2+2)) (cons.0+96 (Fixed<.quote> ()) (cons.0+96 (cons.0+96 (cons.0+96 (Fixed<.quote> [instof:0]) (Fixed<.quote> ())) (cons.0+96 (cons.0+96 (Fixed<.quote> quasiquote) (cons.0+96 (cons.0+96 (Fixed<.quote> slot-value) (cons.0+96 type-name.2+1 (cons.0+96 (car.0+100 slots.2+2) (cons.0+96 [instof:0].2+0 (Fixed<.quote> ()))))) (Fixed<.quote> ()))) (Fixed<.quote> ()))) (Fixed<.quote> ())))) (make-instance-accessors.0+337 [instof:0].2+0 type-name.2+1 (cdr.0+99 slots.2+2)))
33: apply
callee: .let
arg 0: Env< Lv2,Off3,#0
arg 1: ()
arg 2: (cons.0+96 (cons.0+96 (concat-symbols.0+211 [instof:0].2+0 (Fixed<.quote> .) (car.0+100 slots.2+2)) (cons.0+96 (Fixed<.quote> ()) (cons.0+96 (cons.0+96 (cons.0+96 (Fixed<.quote> [instof:0]) (Fixed<.quote> ())) (cons.0+96 (cons.0+96 (Fixed<.quote> quasiquote) (cons.0+96 (cons.0+96 (Fixed<.quote> slot-value) (cons.0+96 type-name.2+1 (cons.0+96 (car.0+100 slots.2+2) (cons.0+96 [instof:0].2+0 (Fixed<.quote> ()))))) (Fixed<.quote> ()))) (Fixed<.quote> ()))) (Fixed<.quote> ())))) (make-instance-accessors.0+337 [instof:0].2+0 type-name.2+1 (cdr.0+99 slots.2+2)))
34: cons.0+96
callee: .cons
arg 0: (cons.0+96 (concat-symbols.0+211 [instof:0].2+0 (Fixed<.quote> .) (car.0+100 slots.2+2)) (cons.0+96 (Fixed<.quote> ()) (cons.0+96 (cons.0+96 (cons.0+96 (Fixed<.quote> [instof:0]) (Fixed<.quote> ())) (cons.0+96 (cons.0+96 (Fixed<.quote> quasiquote) (cons.0+96 (cons.0+96 (Fixed<.quote> slot-value) (cons.0+96 type-name.2+1 (cons.0+96 (car.0+100 slots.2+2) (cons.0+96 [instof:0].2+0 (Fixed<.quote> ()))))) (Fixed<.quote> ()))) (Fixed<.quote> ()))) (Fixed<.quote> ()))))
arg 1: (make-instance-accessors.0+337 [instof:0].2+0 type-name.2+1 (cdr.0+99 slots.2+2))
35: cons.0+96
callee: .cons
arg 0: (concat-symbols.0+211 [instof:0].2+0 (Fixed<.quote> .) (car.0+100 slots.2+2))
arg 1: (cons.0+96 (Fixed<.quote> ()) (cons.0+96 (cons.0+96 (cons.0+96 (Fixed<.quote> [instof:0]) (Fixed<.quote> ())) (cons.0+96 (cons.0+96 (Fixed<.quote> quasiquote) (cons.0+96 (cons.0+96 (Fixed<.quote> slot-value) (cons.0+96 type-name.2+1 (cons.0+96 (car.0+100 slots.2+2) (cons.0+96 [instof:0].2+0 (Fixed<.quote> ()))))) (Fixed<.quote> ()))) (Fixed<.quote> ()))) (Fixed<.quote> ())))
36: concat-symbols.0+211
callee: Expr<concat-symbols args.2+0>
arg 0: self
arg 1: .
arg 2: id
37: apply
callee: Expr<concat-symbols args.2+0>
arg 0: self
arg 1: .
arg 2: id
38: Fixed<.let>
callee: Fixed<.let>
arg 0: Env< Lv2,Off2,#1
arg 1: (([instof:0].2+1 (car.0+100 args.2+0)))
arg 2: (Fixed<.while> (symbol?.0+36 (car.0+100 (Fixed<.set> args.2+0 (cdr.0+99 args.2+0)))) (Fixed<.set> [instof:0].2+1 (concat-symbol.0+210 [instof:0].2+1 (car.0+100 args.2+0))))
arg 3: [instof:0].2+1
39: apply
callee: .let
arg 0: Env< Lv2,Off2,#1
arg 1: (([instof:0].2+1 (car.0+100 args.2+0)))
arg 2: (Fixed<.while> (symbol?.0+36 (car.0+100 (Fixed<.set> args.2+0 (cdr.0+99 args.2+0)))) (Fixed<.set> [instof:0].2+1 (concat-symbol.0+210 [instof:0].2+1 (car.0+100 args.2+0))))
arg 3: [instof:0].2+1
40: Fixed<.while>
callee: Fixed<.while>
arg 0: (symbol?.0+36 (car.0+100 (Fixed<.set> args.2+0 (cdr.0+99 args.2+0))))
arg 1: (Fixed<.set> [instof:0].2+1 (concat-symbol.0+210 [instof:0].2+1 (car.0+100 args.2+0)))
41: apply
callee: .while
arg 0: (symbol?.0+36 (car.0+100 (Fixed<.set> args.2+0 (cdr.0+99 args.2+0))))
arg 1: (Fixed<.set> [instof:0].2+1 (concat-symbol.0+210 [instof:0].2+1 (car.0+100 args.2+0)))
42: Fixed<.set>
callee: Fixed<.set>
arg 0: [instof:0].2+1
arg 1: (concat-symbol.0+210 [instof:0].2+1 (car.0+100 args.2+0))
43: apply
callee: .set
arg 0: [instof:0].2+1
arg 1: (concat-symbol.0+210 [instof:0].2+1 (car.0+100 args.2+0))
44: concat-symbol.0+210
callee: Expr<concat-symbol (x.2+0 [instof:0].2+1)>
arg 0: self
arg 1: .
45: apply
callee: Expr<concat-symbol (x.2+0 [instof:0].2+1)>
arg 0: self
arg 1: .
46: string->symbol.0+88
callee: .string->symbol
arg 0: (concat-string.0+208 (symbol->string.0+87 x.2+0) (symbol->string.0+87 [instof:0].2+1))
47: concat-string.0+208
callee: Expr<concat-string (x.2+0 [instof:0].2+1)>
arg 0: self
arg 1: .
48: apply
callee: Expr<concat-string (x.2+0 [instof:0].2+1)>
arg 0: self
arg 1: .
49: Fixed<.let>
callee: Fixed<.let>
arg 0: Env< Lv2,Off6,#2
arg 1: ((x-len.2+2 (string-length.0+24 x.2+0)) (y-len.2+3 (string-length.0+24 [instof:0].2+1)))
arg 2: (Fixed<.let> Env< Lv2,Off8,#2 ((res.2+4 (string.0+95 (+.0+53 x-len.2+2 y-len.2+3))) (res-idx.2+5 0)) (Fixed<.let> Env< Lv2,Off7,#1 ((i.2+6 0)) (Fixed<.while> (<.0+45 i.2+6 x-len.2+2) (set-string-at.0+19 res.2+4 res-idx.2+5 (string-at.0+22 x.2+0 i.2+6)) (Fixed<.set> i.2+6 (+.0+53 i.2+6 1)) (Fixed<.set> res-idx.2+5 (+.0+53 res-idx.2+5 1)))) (Fixed<.let> Env< Lv2,Off8,#1 ((i.2+7 0)) (Fixed<.while> (<.0+45 i.2+7 y-len.2+3) (set-string-at.0+19 res.2+4 res-idx.2+5 (string-at.0+22 [instof:0].2+1 i.2+7)) (Fixed<.set> i.2+7 (+.0+53 i.2+7 1)) (Fixed<.set> res-idx.2+5 (+.0+53 res-idx.2+5 1)))) res.2+4)
50: apply
callee: .let
arg 0: Env< Lv2,Off6,#2
arg 1: ((x-len.2+2 (string-length.0+24 x.2+0)) (y-len.2+3 (string-length.0+24 [instof:0].2+1)))
arg 2: (Fixed<.let> Env< Lv2,Off8,#2 ((res.2+4 (string.0+95 (+.0+53 x-len.2+2 y-len.2+3))) (res-idx.2+5 0)) (Fixed<.let> Env< Lv2,Off7,#1 ((i.2+6 0)) (Fixed<.while> (<.0+45 i.2+6 x-len.2+2) (set-string-at.0+19 res.2+4 res-idx.2+5 (string-at.0+22 x.2+0 i.2+6)) (Fixed<.set> i.2+6 (+.0+53 i.2+6 1)) (Fixed<.set> res-idx.2+5 (+.0+53 res-idx.2+5 1)))) (Fixed<.let> Env< Lv2,Off8,#1 ((i.2+7 0)) (Fixed<.while> (<.0+45 i.2+7 y-len.2+3) (set-string-at.0+19 res.2+4 res-idx.2+5 (string-at.0+22 [instof:0].2+1 i.2+7)) (Fixed<.set> i.2+7 (+.0+53 i.2+7 1)) (Fixed<.set> res-idx.2+5 (+.0+53 res-idx.2+5 1)))) res.2+4)
51: Fixed<.let>
callee: Fixed<.let>
arg 0: Env< Lv2,Off8,#2
arg 1: ((res.2+4 (string.0+95 (+.0+53 x-len.2+2 y-len.2+3))) (res-idx.2+5 0))
arg 2: (Fixed<.let> Env< Lv2,Off7,#1 ((i.2+6 0)) (Fixed<.while> (<.0+45 i.2+6 x-len.2+2) (set-string-at.0+19 res.2+4 res-idx.2+5 (string-at.0+22 x.2+0 i.2+6)) (Fixed<.set> i.2+6 (+.0+53 i.2+6 1)) (Fixed<.set> res-idx.2+5 (+.0+53 res-idx.2+5 1))))
arg 3: (Fixed<.let> Env< Lv2,Off8,#1 ((i.2+7 0)) (Fixed<.while> (<.0+45 i.2+7 y-len.2+3) (set-string-at.0+19 res.2+4 res-idx.2+5 (string-at.0+22 [instof:0].2+1 i.2+7)) (Fixed<.set> i.2+7 (+.0+53 i.2+7 1)) (Fixed<.set> res-idx.2+5 (+.0+53 res-idx.2+5 1))))
arg 4: res.2+4
52: apply
callee: .let
arg 0: Env< Lv2,Off8,#2
arg 1: ((res.2+4 (string.0+95 (+.0+53 x-len.2+2 y-len.2+3))) (res-idx.2+5 0))
arg 2: (Fixed<.let> Env< Lv2,Off7,#1 ((i.2+6 0)) (Fixed<.while> (<.0+45 i.2+6 x-len.2+2) (set-string-at.0+19 res.2+4 res-idx.2+5 (string-at.0+22 x.2+0 i.2+6)) (Fixed<.set> i.2+6 (+.0+53 i.2+6 1)) (Fixed<.set> res-idx.2+5 (+.0+53 res-idx.2+5 1))))
arg 3: (Fixed<.let> Env< Lv2,Off8,#1 ((i.2+7 0)) (Fixed<.while> (<.0+45 i.2+7 y-len.2+3) (set-string-at.0+19 res.2+4 res-idx.2+5 (string-at.0+22 [instof:0].2+1 i.2+7)) (Fixed<.set> i.2+7 (+.0+53 i.2+7 1)) (Fixed<.set> res-idx.2+5 (+.0+53 res-idx.2+5 1))))
arg 4: res.2+4
53: Fixed<.let>
callee: Fixed<.let>
arg 0: Env< Lv2,Off8,#1
arg 1: ((i.2+7 0))
arg 2: (Fixed<.while> (<.0+45 i.2+7 y-len.2+3) (set-string-at.0+19 res.2+4 res-idx.2+5 (string-at.0+22 0./bin/sh: line 1: 30572 Segmentation fault: 11 build/maru.9/eval -v --define *host-directory* "build/maru.9" --define *slave-directory* "/Users/runner/work/maru/maru/build/eval0" --define *compiler-backend* "llvm" --define target/cpu x86_64 --define target/vendor apple --define target/os darwin --define feature/profiler false source/bootstrapping/prepare.l boot.l /Users/runner/work/maru/maru/build/eval0/source/bootstrapping/host-ready.l source/bootstrapping/host-extras.l source/bootstrapping/early.l boot.l source/bootstrapping/slave-extras.l source/bootstrapping/late.l source/platforms/libc/eval.l > build/llvm-libc/x86_64-apple-darwin/eval0.ll
it works fine in an x86_64 macos running in kvm on linux.
is this an x86 simulator bug? or something in maru?
the sigsegv at the end could be a stack overflow while printing the backtrace, but does that really eat more stack than the GC?.