Closed henesy closed 3 years ago
@henesy I suspect you were using an older compiler. The latest does not have functions such as addwildrec
.
@henesy
I gave the code a try. The compiler wouldn't crash in the match compiler using the latest.
But the type db
is of the size 32256256*256 = 536,870,912 bytes.
The backend would try to generate instructions for each word of the object, which thus explodes the compiler.
See https://github.com/oridb/mc/blob/master/6/simp.c#L1243 and https://github.com/oridb/mc/blob/master/6/isel.c#L450-L455 where the compiler is generating the code for -> std.Err e
(line 60) in adb.myr.
Thanks :)
This explanation makes sense, thank you.
It would be nice if the compiler handled this kind of overflow sort of thing more gracefully, but on the other hand the data structure was a little absurd :)
Building
The file that crashes 6m, this is not minimized, apologies:
Segfaulting
Compilation:
Running and interrupting valgrind with SIGINT: