Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build-support/java9-openjdk/hotspot-jdk-9.0.4+12-bitmap-segv.patch
blob: 7e325af22d3ab74c113ad8f86d1b58d8faddd62d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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],