Details
Description
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);
Attachments
Issue Links
- is blocked by
-
JDK-8286346 3-parameter version of AllocateHeap should not ignore AllocFailType
-
- Resolved
-