magiclantern_simplified
magiclantern_simplified copied to clipboard
Use D45 qemu to detect inappropriate code behaviour for D678 (null pointers, div by zero, etc)
D45 use a version / configuration of ARM that has different guarantees to D678. E.g. D6 forbids division by zero, D78 use MMU to disallow access to zero page. These are allowed on D45 and so there are bugs where they unintentionally occur.
We should trigger these conditions on purpose in qemu on D45:
- check they behave the same as on cam
- add a switch to qemu to fail on division by zero (and access to 0x0 etc) on D45
- run regression tests on D45 to see what existing code will fail
- fix those problems so D678 is okay
But see null_pointer_check() which requires access through null pointer on D45 to try and detect buggy Canon code.