Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8273108: RunThese24H crashes with SEGV in markWord::displaced_mark_he…
…lper() after JDK-8268276

8272809: JFR thread sampler SI_KERNEL SEGV in metaspace::VirtualSpaceList::contains

Reviewed-by: sviswanathan, kvn
  • Loading branch information
asgibbons authored and Vladimir Kozlov committed Dec 12, 2021
1 parent 9b99cbe commit 9a1bbaf8db0e869ab76be8ab1bd0ddeb23693e7e
Showing 2 changed files with 12 additions and 5 deletions.
@@ -6261,6 +6261,9 @@ address generate_avx_ghash_processBlocks() {
__ cmpl(length, 63);
__ jcc(Assembler::lessEqual, L_finalBit);

__ mov64(rax, 0x0000ffffffffffff);
__ kmovql(k2, rax);

__ align32();
__ BIND(L_process64Loop);

@@ -6282,7 +6285,7 @@ address generate_avx_ghash_processBlocks() {
__ vpmaddwd(merged0, merge_ab_bc0, pack32_op, Assembler::AVX_512bit);
__ vpermb(merged0, pack24bits, merged0, Assembler::AVX_512bit);

__ evmovdquq(Address(dest, dp), merged0, Assembler::AVX_512bit);
__ evmovdqub(Address(dest, dp), k2, merged0, true, Assembler::AVX_512bit);

__ subl(length, 64);
__ addptr(source, 64);
@@ -48,6 +48,7 @@
import java.util.Base64.Encoder;
import java.util.Objects;
import java.util.Random;
import java.util.Arrays;

import compiler.whitebox.CompilerWhiteBoxTest;
import sun.hotspot.code.Compiler;
@@ -79,9 +80,9 @@ public static void main(String[] args) throws Exception {

private static void warmup() {
final int warmupCount = 20_000;
final int bufSize = 60;
final int bufSize = 15308;
byte[] srcBuf = new byte[bufSize];
byte[] encBuf = new byte[(bufSize / 3) * 4];
byte[] encBuf = new byte[((bufSize + 2) / 3) * 4];
byte[] decBuf = new byte[bufSize];

ran.nextBytes(srcBuf);
@@ -163,10 +164,13 @@ public static void test0(FileType inputFileType, Base64Type type, Encoder encode
assertEqual(resEncodeStr, encodedStr);

// test int decode(byte[], byte[])
resArr = new byte[srcArr.length];
// JDK-8273108: Test for output buffer overrun
resArr = new byte[srcArr.length + 2];
resArr[srcArr.length + 1] = (byte) 167;
len = decoder.decode(encodedArr, resArr);
assertEqual(len, srcArr.length);
assertEqual(resArr, srcArr);
assertEqual(Arrays.copyOfRange(resArr, 0, srcArr.length), srcArr);
assertEqual(resArr[srcArr.length + 1], (byte) 167);

// test byte[] decode(byte[])
resArr = decoder.decode(encodedArr);

1 comment on commit 9a1bbaf

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 9a1bbaf Dec 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.