Skip to content

Commit 3f1ab0e

Browse files
zhengyu123jbachorik
authored andcommitted
WalkVM crash in dd-java-agent v1.56.0 (#298)
(cherry picked from commit 5ec6f6a)
1 parent a59bee8 commit 3f1ab0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ddprof-lib/src/main/cpp/safeAccess.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ class SafeAccess {
4545

4646
static bool handle_safefetch(int sig, void* context);
4747

48-
static inline void *load(void **ptr) {
48+
static inline void *load(void **ptr, void* default_value = nullptr) {
4949
return loadPtr(ptr, nullptr);
5050
}
5151

52-
static inline u32 load32(u32 *ptr, u32 default_value) {
52+
static inline u32 load32(u32 *ptr, u32 default_value = 0) {
5353
int res = safefetch32_impl((int*)ptr, (int)default_value);
5454
return static_cast<u32>(res);
5555
}

0 commit comments

Comments
 (0)