Skip to content

Code generator crashes on bad arities

The AMD64 code generator in (loko arch amd64 codegen) crashes when it generates code for a primitive that has been called with too few arguments. It also doesn't catch the case where there are too many arguments.

Instead of crashing, the fallthrough to cg-primcall-proc should be used. This will generate code that raises the right condition at runtime.

(One might be tempted to add a compiler warning but I think it's better to do the warnings in r6lint).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information