diff options
author | Bin Lu <bin.lu@arm.com> | 2020-06-02 04:25:32 -0400 |
---|---|---|
committer | Bin Lu <bin.lu@arm.com> | 2020-09-30 11:54:37 +0800 |
commit | 45221684f3e3d985f91a1a896cac616c537516e2 (patch) | |
tree | 86953f12d03a8bb7d6e1e9cb1c922ce8f52c49ab /tools | |
parent | 4b5eae39f201ffbe7f4a0e08a28380099469efe8 (diff) |
avoid the random memory barrier issue in mmap testing on Arm64
There is a new random issue on some Arm64 machines.
This scene can be summarized as following:
Sometimes, the content of the func() pointer is still 0 opcode.
The probability of this kind of issue is very low,
currently only available on some machines.
After inserting a simple memory barrier, this issue was gone.
The code to directly use the memory barrier is as follows:
memcpy(reinterpret_cast<void*>(addr), machine_code, sizeof(machine_code));
isb()
func = reinterpret_cast<uint32_t (*)(void)>(addr);
Signed-off-by: Bin Lu <bin.lu@arm.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions