You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates GetInstructionSize to account for arm64 instruction sizes.
ARM64 instruction are always 4 bytes long but GetInstructionSize in
interception_win.cpp assumes x86_64 which has mixed sizes.
Fix is for: #64319
Before the changeclang_rt.asan_dynamic-aarch64.dll would crash at:
OverrideFunction -> OverrideFunctionWithHotPatch -> GetInstructionSize:825
After the change:
dllthunkintercept -> dllthunkgetrealaddressordie -> InternalGetProcAddress
ZijunZhaoCCK
pushed a commit
to ZijunZhaoCCK/llvm-project
that referenced
this issue
Sep 19, 2023
Updates GetInstructionSize to account for arm64 instruction sizes.
ARM64 instruction are always 4 bytes long but GetInstructionSize in
interception_win.cpp assumes x86_64 which has mixed sizes.
Fix is for: llvm#64319
Before the changeclang_rt.asan_dynamic-aarch64.dll would crash at:
OverrideFunction -> OverrideFunctionWithHotPatch -> GetInstructionSize:825
After the change:
dllthunkintercept -> dllthunkgetrealaddressordie -> InternalGetProcAddress
For context you can build asan for arm64 however it asserts in
GetInstructionSize
because it can't parse the arm instructions.SANITIZER_WINDOWS64
as defined should only be used to determine if we are working on a 32bit or 64bit operating system.llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
Lines 114 to 118 in 145a929
However, in practice it is being used to parse x86_64 instructions.
llvm-project/compiler-rt/lib/interception/interception_win.cpp
Lines 459 to 486 in 145a929
I put up a patch: here https://reviews.llvm.org/D156839
based on:
farzonl@223ee30
The text was updated successfully, but these errors were encountered: