Closed robsimmons closed 11 years ago
The test tests/rjs-basic/error5.c0 triggers the ARRAYLENGTH and ATHROW exceptions. The AADDS error is tricky because the bytecode would have almost certainly thrown a segfault naturally anyway, and we don't distinguish checked segfault from undefined-behavior segfault in the VM/
This should be resolved as of r173.
AADDS should always cause a c0_memory_error when given a NULL pointer, but ARRAYLENGTH should return 0. This is necessary due to the behavior of default-initialized arrays.
The new ATHROW instruction will also have this problem, because NULL is a valid string in C0 equal to the constant "".