From f10b8c6561d9f452c5b958dd6fe65faf0fd5da7d Mon Sep 17 00:00:00 2001 From: Zhengyu Gu Date: Thu, 20 Nov 2025 16:32:04 -0500 Subject: [PATCH] WalkVM crash in dd-java-agent v1.56.0 --- ddprof-lib/src/main/cpp/safeAccess.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddprof-lib/src/main/cpp/safeAccess.h b/ddprof-lib/src/main/cpp/safeAccess.h index 56e34006e..144b9289d 100644 --- a/ddprof-lib/src/main/cpp/safeAccess.h +++ b/ddprof-lib/src/main/cpp/safeAccess.h @@ -45,11 +45,11 @@ class SafeAccess { static bool handle_safefetch(int sig, void* context); - static inline void *load(void **ptr) { + static inline void *load(void **ptr, void* default_value = nullptr) { return loadPtr(ptr, nullptr); } - static inline u32 load32(u32 *ptr, u32 default_value) { + static inline u32 load32(u32 *ptr, u32 default_value = 0) { int res = safefetch32_impl((int*)ptr, (int)default_value); return static_cast(res); }