Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
v2
  • Loading branch information
zhengyu123 committed Jul 21, 2025
commit dce4c5fa22329a0ae0b0563ab1d5cb88d3548b72
8 changes: 4 additions & 4 deletions ddprof-lib/src/main/cpp/safeAccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ extern "C" int64_t safefetch64_cont(int64_t* adr, int64_t errValue);
#endif

/**
Loading a 32-bit value from specific address, the errValue will be returned
Loading a 32-bit/64-bit value from specific address, the errValue will be returned
if the address is invalid.
The load is protected by the 'handle_safefetch` signal handler, who sets next `pc`
to `safefetch32_cont`, upon returning from signal handler, `safefetch32_cont` returns `errValue`
to `safefetch32_cont/safefetch64_cont`, upon returning from signal handler,
`safefetch32_cont/safefetch64_cont` returns `errValue`
**/

#if defined(__x86_64__)
#ifdef __APPLE__
asm(R"(
Expand Down Expand Up @@ -74,7 +74,7 @@ extern "C" int64_t safefetch64_cont(int64_t* adr, int64_t errValue);
.globl safefetch32_impl
.hidden safefetch32_impl
.type safefetch32_imp, %function
safefetch64_impl:
safefetch32_impl:
movl (%rdi), %eax
ret
.globl safefetch32_cont
Expand Down
Loading