frankpfenning / C0

C0 Language
4 stars 0 forks source link

Invalid bytecode format generated and accepted for large programs #21

Closed robsimmons closed 11 years ago

robsimmons commented 11 years ago

Demonstrated by a very large file in the PIC repository - pic/common/scripts/grading/hw8-support/tests/task3/c0 - the compiler will happily generate, and the VM will happily interpret, invalid bytecode of the following format:

#<main>
00 00             # number of arguments = 0
00 01             # number of local variables = 1
2F9 BB            # code length = 195003 bytes
varming commented 11 years ago

Several tests have this problem:

brachiosaurus-stress-type.c0 brachiosaurus-struct-stress2.c0 kite-return2.c0 kritosaurus-safe08.c0 saltopus-nest.c0 utahraptor-big.c0

robsimmons commented 11 years ago

This was actually fixed by @varming in r142-r152, and I fixed the regression tests corresponding to this in r171.