RFR (T) 8237217: Incorrect G1StringDedupEntry type used in StringDedupTable destructor
Aleksey Shipilev
shade at redhat.com
Wed Jan 15 18:48:28 UTC 2020
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
More information about the hotspot-gc-dev
mailing list