Open tgoddard opened 8 years ago
Thanks a lot!
Yeah, this is just a crude "will it work at all" implementation, but you are right, usually you never do a proper reimplementation from scratch, so better to keep the quality high even in hacky prototypes.
The linker certainly has to be improved, though I would prefer statically linked binaries directly from llvm - I could not find a proper specification of the lanai elf format and had to do some guesswork in some places.
I'm kind of wondering about the memStoreWord and memStoreByte functions, though, as there are bounds checks. Perhaps this is about the 32 bit pos + 4
operation?
That could well be the cause if that overflows - would suddenly become very small and not resize the string.
Hello,
I put the interpreter through AFL to find memory corruptions issues early on, set the foundations. Quite a few popped out - need to harden that up before allowing people to run untrusted code.
Identified the following causes so far:
Here are stack traces caused by each of those issues, attached the raw test cases:
crashes.zip