-
Bug
-
Resolution: Fixed
-
P4
-
17, 19
-
b22
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8308945 | 17.0.8 | Aleksey Shipilev | P4 | Resolved | Fixed | b05 |
While analyzing valgrind log, I noticed abnormal entries:
Conditional jump or move depends on uninitialised value(s)
at 0x5AF96E7: is_readable_pointer (os.cpp:1056)
by 0x5AF96E7: is_pointer_bad (os.cpp:1177)
by 0x5AF96E7: is_pointer_bad (os.cpp:1176)
by 0x5AF96E7: os::is_first_C_frame(frame*) (os.cpp:1199)
by 0x5B0BD56: os::get_native_stack(unsigned char**, int, int) (os_posix.cpp:155)
by 0x578EA1F: jni_GetStringUTFChars (jni.cpp:2236)
by 0xF2D9A6A: Java_jdk_internal_loader_NativeLibrary_findEntry0 (NativeLibraries.c:233)
Because I did not turn on NMT detail tracking, there should not have stack walking.
It turns out that jni_GetStringUTFChars() passes 0 as NativeCallStack reference (see below), that results construction of NativeCallStack, where it performs stack walking in its constructor.
result = AllocateHeap(length + 1, mtInternal, 0, AllocFailStrategy::RETURN_NULL);
Conditional jump or move depends on uninitialised value(s)
at 0x5AF96E7: is_readable_pointer (os.cpp:1056)
by 0x5AF96E7: is_pointer_bad (os.cpp:1177)
by 0x5AF96E7: is_pointer_bad (os.cpp:1176)
by 0x5AF96E7: os::is_first_C_frame(frame*) (os.cpp:1199)
by 0x5B0BD56: os::get_native_stack(unsigned char**, int, int) (os_posix.cpp:155)
by 0x578EA1F: jni_GetStringUTFChars (jni.cpp:2236)
by 0xF2D9A6A: Java_jdk_internal_loader_NativeLibrary_findEntry0 (NativeLibraries.c:233)
Because I did not turn on NMT detail tracking, there should not have stack walking.
It turns out that jni_GetStringUTFChars() passes 0 as NativeCallStack reference (see below), that results construction of NativeCallStack, where it performs stack walking in its constructor.
result = AllocateHeap(length + 1, mtInternal, 0, AllocFailStrategy::RETURN_NULL);
- backported by
-
JDK-8308945 jni_GetStringUTFChars() uses wrong heap allocator
- Resolved
- is blocked by
-
JDK-8286346 3-parameter version of AllocateHeap should not ignore AllocFailType
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/3d32a20e
-
Commit openjdk/jdk/b0d2b0a3
-
Review openjdk/jdk17u-dev/1401
-
Review openjdk/jdk/8579
(1 links to)