regression 1010: Clang: prevent unwanted optimization

Calling a NULL function pointer is undefined behavior in C, therefore
when the compiler identifies such a pattern it is allowed to do pretty
much anything. Clang simply does not take the "case 3" branch in
ta_entry_bad_mem_access().

In order to force the call, this patch uses a volatile function pointer
so that the compiler cannot assume anything about its value.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
1 file changed
tree: 97d7c603b320edb717133d7d47c77a7bbf8438d6
  1. cert/
  2. host/
  3. package/
  4. scripts/
  5. ta/
  6. .gitignore
  7. Android.mk
  8. CMakeLists.txt
  9. CMakeToolchain.txt
  10. LICENSE.md
  11. Makefile
  12. README.md
README.md

OP-TEE sanity testsuite

This git contains source code for the test suite (xtest) used to test the OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_test.

// OP-TEE core maintainers