zephyr/tests/ztest
Ioannis Glaropoulos f620ceacde tests: modify test case so it does not crash on cortex-m
The test case suggests that "For most arch which support
userspace, derefencing NULL pointer will be caught by
exception.". This is certainly not true for Cortex-M, where
read access to address 0x0 is generally allowed. The reason
the test had been passing was either 1) because in many
Cortex-M platforms, including QEMU, address 0x0 is unmapped,
or 2) GCC is generating an undefining instruction. However,
now that we have activated the null pointer derefrencing
detection, we may end up with two exceptions and the test
would fail.

Change illegal access to something outside the mapped memory
area, e.g. 0xFFFFFFFF.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-05 15:03:24 +03:00
..
base
custom_output
error_hook tests: modify test case so it does not crash on cortex-m 2021-03-05 15:03:24 +03:00
mock