Re: RFR: 8333361: ubsan, test : libHeapMonitorTest.cpp:518:9: runtime error: null pointer passed as argument 2, which is declared to never be null

2024-06-21 Thread Matthias Baesken
On Thu, 20 Jun 2024 11:58:23 GMT, Matthias Baesken  wrote:

> The following issue has been observed when running
> serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorThreadTest  (and some 
> other :tier1 tests)
> on Linux with ubsan enabled binaries :
> 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518:9:
>  runtime error: null pointer passed as argument 2, which is declared to never 
> be null
> #0 0x80388020 in event_storage_augment_storage 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518
> #1 0x80388020 in event_storage_add 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:557
> #2 0x85e695fc in JvmtiExport::post_sampled_object_alloc(JavaThread*, 
> oopDesc*) src/hotspot/share/prims/jvmtiExport.cpp:2926
> #3 0x85e558b8 in 
> JvmtiObjectAllocEventCollector::generate_call_for_allocated() 
> src/hotspot/share/prims/jvmtiExport.cpp:3074
> #4 0x85e56c14 in 
> JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector()
>  src/hotspot/share/prims/jvmtiExport.cpp:3171
> #5 0x85e56c14 in 
> JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector()
>  src/hotspot/share/prims/jvmtiExport.cpp:3166
> #6 0x862ace34 in 
> MemAllocator::Allocation::notify_allocation_jvmti_sampler() 
> src/hotspot/share/gc/shared/memAllocator.cpp:196
> #7 0x862af7a4 in MemAllocator::Allocation::~Allocation() 
> src/hotspot/share/gc/shared/memAllocator.cpp:87
> #8 0x862af7a4 in MemAllocator::allocate() const 
> src/hotspot/share/gc/shared/memAllocator.cpp:356
> #9 0x86dca4dc in CollectedHeap::array_allocate(Klass*, unsigned long, 
> int, bool, JavaThread*) 
> src/hotspot/share/gc/shared/collectedHeap.inline.hpp:41
> #10 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
> JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:93
> #11 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
> JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:89
> #12 0x857f35c8 in InterpreterRuntime::newarray(JavaThread*, 
> BasicType, int) src/hotspot/share/interpreter/interpreterRuntime.cpp:232
> #13 0x6b094cf4 ()

Thanks for the reviews !

-

PR Comment: https://git.openjdk.org/jdk/pull/19804#issuecomment-2182284335


Re: RFR: 8333361: ubsan, test : libHeapMonitorTest.cpp:518:9: runtime error: null pointer passed as argument 2, which is declared to never be null

2024-06-20 Thread Alex Menkov
On Thu, 20 Jun 2024 11:58:23 GMT, Matthias Baesken  wrote:

> The following issue has been observed when running
> serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorThreadTest  (and some 
> other :tier1 tests)
> on Linux with ubsan enabled binaries :
> 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518:9:
>  runtime error: null pointer passed as argument 2, which is declared to never 
> be null
> #0 0x80388020 in event_storage_augment_storage 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518
> #1 0x80388020 in event_storage_add 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:557
> #2 0x85e695fc in JvmtiExport::post_sampled_object_alloc(JavaThread*, 
> oopDesc*) src/hotspot/share/prims/jvmtiExport.cpp:2926
> #3 0x85e558b8 in 
> JvmtiObjectAllocEventCollector::generate_call_for_allocated() 
> src/hotspot/share/prims/jvmtiExport.cpp:3074
> #4 0x85e56c14 in 
> JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector()
>  src/hotspot/share/prims/jvmtiExport.cpp:3171
> #5 0x85e56c14 in 
> JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector()
>  src/hotspot/share/prims/jvmtiExport.cpp:3166
> #6 0x862ace34 in 
> MemAllocator::Allocation::notify_allocation_jvmti_sampler() 
> src/hotspot/share/gc/shared/memAllocator.cpp:196
> #7 0x862af7a4 in MemAllocator::Allocation::~Allocation() 
> src/hotspot/share/gc/shared/memAllocator.cpp:87
> #8 0x862af7a4 in MemAllocator::allocate() const 
> src/hotspot/share/gc/shared/memAllocator.cpp:356
> #9 0x86dca4dc in CollectedHeap::array_allocate(Klass*, unsigned long, 
> int, bool, JavaThread*) 
> src/hotspot/share/gc/shared/collectedHeap.inline.hpp:41
> #10 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
> JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:93
> #11 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
> JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:89
> #12 0x857f35c8 in InterpreterRuntime::newarray(JavaThread*, 
> BasicType, int) src/hotspot/share/interpreter/interpreterRuntime.cpp:232
> #13 0x6b094cf4 ()

Marked as reviewed by amenkov (Reviewer).

-

PR Review: https://git.openjdk.org/jdk/pull/19804#pullrequestreview-2131088045


Re: RFR: 8333361: ubsan, test : libHeapMonitorTest.cpp:518:9: runtime error: null pointer passed as argument 2, which is declared to never be null

2024-06-20 Thread Lutz Schmidt
On Thu, 20 Jun 2024 11:58:23 GMT, Matthias Baesken  wrote:

> The following issue has been observed when running
> serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorThreadTest  (and some 
> other :tier1 tests)
> on Linux with ubsan enabled binaries :
> 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518:9:
>  runtime error: null pointer passed as argument 2, which is declared to never 
> be null
> #0 0x80388020 in event_storage_augment_storage 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518
> #1 0x80388020 in event_storage_add 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:557
> #2 0x85e695fc in JvmtiExport::post_sampled_object_alloc(JavaThread*, 
> oopDesc*) src/hotspot/share/prims/jvmtiExport.cpp:2926
> #3 0x85e558b8 in 
> JvmtiObjectAllocEventCollector::generate_call_for_allocated() 
> src/hotspot/share/prims/jvmtiExport.cpp:3074
> #4 0x85e56c14 in 
> JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector()
>  src/hotspot/share/prims/jvmtiExport.cpp:3171
> #5 0x85e56c14 in 
> JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector()
>  src/hotspot/share/prims/jvmtiExport.cpp:3166
> #6 0x862ace34 in 
> MemAllocator::Allocation::notify_allocation_jvmti_sampler() 
> src/hotspot/share/gc/shared/memAllocator.cpp:196
> #7 0x862af7a4 in MemAllocator::Allocation::~Allocation() 
> src/hotspot/share/gc/shared/memAllocator.cpp:87
> #8 0x862af7a4 in MemAllocator::allocate() const 
> src/hotspot/share/gc/shared/memAllocator.cpp:356
> #9 0x86dca4dc in CollectedHeap::array_allocate(Klass*, unsigned long, 
> int, bool, JavaThread*) 
> src/hotspot/share/gc/shared/collectedHeap.inline.hpp:41
> #10 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
> JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:93
> #11 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
> JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:89
> #12 0x857f35c8 in InterpreterRuntime::newarray(JavaThread*, 
> BasicType, int) src/hotspot/share/interpreter/interpreterRuntime.cpp:232
> #13 0x6b094cf4 ()

LGTM.

-

Marked as reviewed by lucy (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19804#pullrequestreview-2130462767


Re: RFR: 8333361: ubsan, test : libHeapMonitorTest.cpp:518:9: runtime error: null pointer passed as argument 2, which is declared to never be null

2024-06-20 Thread Andreas Steiner
On Thu, 20 Jun 2024 11:58:23 GMT, Matthias Baesken  wrote:

> The following issue has been observed when running
> serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorThreadTest  (and some 
> other :tier1 tests)
> on Linux with ubsan enabled binaries :
> 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518:9:
>  runtime error: null pointer passed as argument 2, which is declared to never 
> be null
> #0 0x80388020 in event_storage_augment_storage 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518
> #1 0x80388020 in event_storage_add 
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:557
> #2 0x85e695fc in JvmtiExport::post_sampled_object_alloc(JavaThread*, 
> oopDesc*) src/hotspot/share/prims/jvmtiExport.cpp:2926
> #3 0x85e558b8 in 
> JvmtiObjectAllocEventCollector::generate_call_for_allocated() 
> src/hotspot/share/prims/jvmtiExport.cpp:3074
> #4 0x85e56c14 in 
> JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector()
>  src/hotspot/share/prims/jvmtiExport.cpp:3171
> #5 0x85e56c14 in 
> JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector()
>  src/hotspot/share/prims/jvmtiExport.cpp:3166
> #6 0x862ace34 in 
> MemAllocator::Allocation::notify_allocation_jvmti_sampler() 
> src/hotspot/share/gc/shared/memAllocator.cpp:196
> #7 0x862af7a4 in MemAllocator::Allocation::~Allocation() 
> src/hotspot/share/gc/shared/memAllocator.cpp:87
> #8 0x862af7a4 in MemAllocator::allocate() const 
> src/hotspot/share/gc/shared/memAllocator.cpp:356
> #9 0x86dca4dc in CollectedHeap::array_allocate(Klass*, unsigned long, 
> int, bool, JavaThread*) 
> src/hotspot/share/gc/shared/collectedHeap.inline.hpp:41
> #10 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
> JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:93
> #11 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
> JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:89
> #12 0x857f35c8 in InterpreterRuntime::newarray(JavaThread*, 
> BasicType, int) src/hotspot/share/interpreter/interpreterRuntime.cpp:232
> #13 0x6b094cf4 ()

LGTM

-

Marked as reviewed by asteiner (Author).

PR Review: https://git.openjdk.org/jdk/pull/19804#pullrequestreview-2130310413


RFR: 8333361: ubsan,test : libHeapMonitorTest.cpp:518:9: runtime error: null pointer passed as argument 2, which is declared to never be null

2024-06-20 Thread Matthias Baesken
The following issue has been observed when running
serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorThreadTest  (and some 
other :tier1 tests)
on Linux with ubsan enabled binaries :

test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518:9:
 runtime error: null pointer passed as argument 2, which is declared to never 
be null
#0 0x80388020 in event_storage_augment_storage 
test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:518
#1 0x80388020 in event_storage_add 
test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp:557
#2 0x85e695fc in JvmtiExport::post_sampled_object_alloc(JavaThread*, 
oopDesc*) src/hotspot/share/prims/jvmtiExport.cpp:2926
#3 0x85e558b8 in 
JvmtiObjectAllocEventCollector::generate_call_for_allocated() 
src/hotspot/share/prims/jvmtiExport.cpp:3074
#4 0x85e56c14 in 
JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector() 
src/hotspot/share/prims/jvmtiExport.cpp:3171
#5 0x85e56c14 in 
JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector() 
src/hotspot/share/prims/jvmtiExport.cpp:3166
#6 0x862ace34 in 
MemAllocator::Allocation::notify_allocation_jvmti_sampler() 
src/hotspot/share/gc/shared/memAllocator.cpp:196
#7 0x862af7a4 in MemAllocator::Allocation::~Allocation() 
src/hotspot/share/gc/shared/memAllocator.cpp:87
#8 0x862af7a4 in MemAllocator::allocate() const 
src/hotspot/share/gc/shared/memAllocator.cpp:356
#9 0x86dca4dc in CollectedHeap::array_allocate(Klass*, unsigned long, 
int, bool, JavaThread*) src/hotspot/share/gc/shared/collectedHeap.inline.hpp:41
#10 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:93
#11 0x86dca4dc in TypeArrayKlass::allocate_common(int, bool, 
JavaThread*) src/hotspot/share/oops/typeArrayKlass.cpp:89
#12 0x857f35c8 in InterpreterRuntime::newarray(JavaThread*, BasicType, 
int) src/hotspot/share/interpreter/interpreterRuntime.cpp:232
#13 0x6b094cf4 ()

-

Commit messages:
 - JDK-861

Changes: https://git.openjdk.org/jdk/pull/19804/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk=19804=00
  Issue: https://bugs.openjdk.org/browse/JDK-861
  Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/19804.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19804/head:pull/19804

PR: https://git.openjdk.org/jdk/pull/19804