RFR (T) 8237217: Incorrect G1StringDedupEntry type used in StringDedupTable destructor
Bug: https://bugs.openjdk.java.net/browse/JDK-8237217 Spotted this when reading the strdedup code. This is a trivial leftover from JDK-8203641. G1StringDedupEntry symbol does not even exist, and the whole thing works because FREE_C_HEAP_ARRAY ignores that parameter. But it should be consistent anyway with constructor anyway. I would not bother with jdk-submit testing, as it looks pretty trivial. Fix: diff -r f7edb9ca045c src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp --- a/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp Fri Jan 10 15:38:25 2020 +0100 +++ b/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp Wed Jan 15 19:47:47 2020 +0100 @@ -234,11 +234,11 @@ _buckets = NEW_C_HEAP_ARRAY(StringDedupEntry*, _size, mtGC); memset(_buckets, 0, _size * sizeof(StringDedupEntry*)); } StringDedupTable::~StringDedupTable() { - FREE_C_HEAP_ARRAY(G1StringDedupEntry*, _buckets); + FREE_C_HEAP_ARRAY(StringDedupEntry*, _buckets); } Testing: x86_64 fastdebug build; hotspot_gc_shenandoah -- Thanks, -Aleksey
On Jan 15, 2020, at 1:48 PM, Aleksey Shipilev <shade@redhat.com> wrote:
Bug: https://bugs.openjdk.java.net/browse/JDK-8237217
Spotted this when reading the strdedup code. This is a trivial leftover from JDK-8203641. G1StringDedupEntry symbol does not even exist, and the whole thing works because FREE_C_HEAP_ARRAY ignores that parameter. But it should be consistent anyway with constructor anyway.
I would not bother with jdk-submit testing, as it looks pretty trivial.
Looks good, and trivial.
Fix:
diff -r f7edb9ca045c src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp --- a/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp Fri Jan 10 15:38:25 2020 +0100 +++ b/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp Wed Jan 15 19:47:47 2020 +0100 @@ -234,11 +234,11 @@ _buckets = NEW_C_HEAP_ARRAY(StringDedupEntry*, _size, mtGC); memset(_buckets, 0, _size * sizeof(StringDedupEntry*)); }
StringDedupTable::~StringDedupTable() { - FREE_C_HEAP_ARRAY(G1StringDedupEntry*, _buckets); + FREE_C_HEAP_ARRAY(StringDedupEntry*, _buckets); }
Testing: x86_64 fastdebug build; hotspot_gc_shenandoah
-- Thanks, -Aleksey
On 1/15/20 7:51 PM, Kim Barrett wrote:
On Jan 15, 2020, at 1:48 PM, Aleksey Shipilev <shade@redhat.com> wrote:
Bug: https://bugs.openjdk.java.net/browse/JDK-8237217
Spotted this when reading the strdedup code. This is a trivial leftover from JDK-8203641. G1StringDedupEntry symbol does not even exist, and the whole thing works because FREE_C_HEAP_ARRAY ignores that parameter. But it should be consistent anyway with constructor anyway.
I would not bother with jdk-submit testing, as it looks pretty trivial.
Looks good, and trivial. Thanks, pushed.
-- Thanks, -Aleksey
Good and trivial. -Zhengyu On 1/15/20 1:48 PM, Aleksey Shipilev wrote:
Bug: https://bugs.openjdk.java.net/browse/JDK-8237217
Spotted this when reading the strdedup code. This is a trivial leftover from JDK-8203641. G1StringDedupEntry symbol does not even exist, and the whole thing works because FREE_C_HEAP_ARRAY ignores that parameter. But it should be consistent anyway with constructor anyway.
I would not bother with jdk-submit testing, as it looks pretty trivial.
Fix:
diff -r f7edb9ca045c src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp --- a/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp Fri Jan 10 15:38:25 2020 +0100 +++ b/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp Wed Jan 15 19:47:47 2020 +0100 @@ -234,11 +234,11 @@ _buckets = NEW_C_HEAP_ARRAY(StringDedupEntry*, _size, mtGC); memset(_buckets, 0, _size * sizeof(StringDedupEntry*)); }
StringDedupTable::~StringDedupTable() { - FREE_C_HEAP_ARRAY(G1StringDedupEntry*, _buckets); + FREE_C_HEAP_ARRAY(StringDedupEntry*, _buckets); }
Testing: x86_64 fastdebug build; hotspot_gc_shenandoah
participants (3)
-
Aleksey Shipilev
-
Kim Barrett
-
Zhengyu Gu