[PATCH] D128387: [hwasan] Add __hwasan_record_frame_record to the hwasan interface
Roland McGrath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 11:14:25 PDT 2022
mcgrathr added a comment.
I don't see a problem having the compiler-rt and compiler changes in the same commit. Seems desirable in this case, actually.
================
Comment at: compiler-rt/lib/hwasan/hwasan_interface_internal.h:172
+SANITIZER_INTERFACE_ATTRIBUTE
+void __hwasan_record_frame_record(u64 frame_record_info);
+
----------------
A comment here about when the compiler generates calls to this would be helpful.
================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1210
+ IntptrTy->getPointerTo(0));
+ IRB.CreateStore(IRB.CreateOr(PC, SP), RecordPtr);
+
----------------
It seems better to call the subroutine you just broke out above rather than to have its logic still open-coded here as well.
Conversely, perhaps just move this code up before the conditional and reuse the same `FrameRecordInfo` local variable in both the libcall and direct-store cases, rather than having a subroutine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128387/new/
https://reviews.llvm.org/D128387
More information about the llvm-commits
mailing list