Skip to content

Commit

Permalink
DISPATCH-1783 Fix Aarch64 ubsan warning in cpp-stub
Browse files Browse the repository at this point in the history
assigning to misaligned variable
  • Loading branch information
jiridanek committed Mar 9, 2022
1 parent 648d27f commit b18bca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/cpp-stub/cpp_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#define REPLACE_FAR(t, fn, fn_stub)\
((uint32_t*)fn)[0] = 0x58000040 | 9;\
((uint32_t*)fn)[1] = 0xd61f0120 | (9 << 5);\
*(long long *)(fn + 8) = (long long )fn_stub;\
memcpy((long long *)(fn + 8), &fn_stub, sizeof(long long));\
CACHEFLUSH((char *)fn, CODESIZE);
#define REPLACE_NEAR(t, fn, fn_stub) REPLACE_FAR(t, fn, fn_stub)
#elif defined(__arm__) || defined(_M_ARM)
Expand Down

0 comments on commit b18bca6

Please sign in to comment.