summaryrefslogtreecommitdiff
path: root/build-support/java9-openjdk/hotspot-jdk-9.0.4+12-bitmap-segv.patch
diff options
context:
space:
mode:
Diffstat (limited to 'build-support/java9-openjdk/hotspot-jdk-9.0.4+12-bitmap-segv.patch')
-rw-r--r--build-support/java9-openjdk/hotspot-jdk-9.0.4+12-bitmap-segv.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/build-support/java9-openjdk/hotspot-jdk-9.0.4+12-bitmap-segv.patch b/build-support/java9-openjdk/hotspot-jdk-9.0.4+12-bitmap-segv.patch
new file mode 100644
index 00000000..7e325af2
--- /dev/null
+++ b/build-support/java9-openjdk/hotspot-jdk-9.0.4+12-bitmap-segv.patch
@@ -0,0 +1,27 @@
+diff -rauN hotspot-jdk-9.0.4+12/src/share/vm/utilities/bitMap.cpp hotspot-jdk-9.0.4+12-bitmap-segv-patch/src/share/vm/utilities/bitMap.cpp
+--- hotspot-jdk-9.0.4+12/src/share/vm/utilities/bitMap.cpp 2018-01-22 16:19:02.000000000 +0100
++++ hotspot-jdk-9.0.4+12-bitmap-segv-patch/src/share/vm/utilities/bitMap.cpp 2021-05-16 16:22:06.049850445 +0200
+@@ -78,8 +78,10 @@
+ if (new_size_in_words > 0) {
+ map = allocator.allocate(new_size_in_words);
+
+- Copy::disjoint_words((HeapWord*)old_map, (HeapWord*) map,
+- MIN2(old_size_in_words, new_size_in_words));
++ if (old_map != NULL) {
++ Copy::disjoint_words((HeapWord*)old_map, (HeapWord*) map,
++ MIN2(old_size_in_words, new_size_in_words));
++ }
+
+ if (new_size_in_words > old_size_in_words) {
+ clear_range_of_words(map, old_size_in_words, new_size_in_words);
+@@ -543,7 +545,9 @@
+ bm_word_t* dest_map = map();
+ const bm_word_t* other_map = other.map();
+ idx_t copy_words = word_index(size());
+- Copy::disjoint_words((HeapWord*)other_map, (HeapWord*)dest_map, copy_words);
++ if (other_map != NULL) {
++ Copy::disjoint_words((HeapWord*)other_map, (HeapWord*)dest_map, copy_words);
++ }
+ idx_t rest = bit_in_word(size());
+ if (rest > 0) {
+ dest_map[copy_words] = merge_tail_of_map(other_map[copy_words],