commit | e2a58c62f777f15ec71421651647cda157f48dc2 | [log] [tgz] |
---|---|---|
author | Jerome Forissier <jerome@forissier.org> | Thu Sep 19 16:01:54 2019 +0200 |
committer | Jérôme Forissier <jerome@forissier.org> | Thu Sep 19 18:24:28 2019 +0200 |
tree | 97d7c603b320edb717133d7d47c77a7bbf8438d6 | |
parent | 71da60f83eec2de6d3d3bb99846bbbb12d20369e [diff] |
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>
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