https://github.com/shdown/isekai/tree/927e3a62101efbed123596226cada1b5e2621360
$ crystal v
Crystal 0.30.1 [5e6a1b672] (2019-08-12)
LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu
$ make
crystal build src/isekai.cr
Invalid memory access (signal 11) at address 0x3fd01
[0x7f9d8bbaa7d6] ???
[0x7f9d8bac28a0] ???
[0x7f9d8cff14d7] ???
make: *** [Makefile:2: isekai] Error 11
Reduced the code size needed to reproduce, see https://github.com/shdown/crystal-segfault
Reduced:
def foo
x = 1
yield x if x.is_a?(Char)
yield x if x.is_a?(Int32)
end
foo { |x| }
Weird, carc.in doesn't segfault on your reduction @asterite, but gives a compiler bug https://carc.in/#/r/7fcf BUG: trying to assign Nil <- Int32
Are you sure it's the same problem?
Yes, it's the same issue. The segfault happens for him in the compiler for some reason, I don't know why.
Or, well, @shdown would have to try compiling it with master compiled.