mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +02:00
6659207: access violation in CompilerThread0
Split_thru_phi produces top on a non-dead path Reviewed-by: kvn, rasbold, sgoldman
This commit is contained in:
parent
8e1624d88c
commit
49434b6bad
2 changed files with 65 additions and 0 deletions
|
@ -29,6 +29,11 @@
|
||||||
//------------------------------split_thru_phi---------------------------------
|
//------------------------------split_thru_phi---------------------------------
|
||||||
// Split Node 'n' through merge point if there is enough win.
|
// Split Node 'n' through merge point if there is enough win.
|
||||||
Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
|
Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
|
||||||
|
if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) {
|
||||||
|
// ConvI2L may have type information on it which is unsafe to push up
|
||||||
|
// so disable this for now
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
int wins = 0;
|
int wins = 0;
|
||||||
assert( !n->is_CFG(), "" );
|
assert( !n->is_CFG(), "" );
|
||||||
assert( region->is_Region(), "" );
|
assert( region->is_Region(), "" );
|
||||||
|
|
60
hotspot/test/compiler/6659207/Test.java
Normal file
60
hotspot/test/compiler/6659207/Test.java
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
||||||
|
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
* @bug 6659207
|
||||||
|
* @summary access violation in CompilerThread0
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Test {
|
||||||
|
static int[] array = new int[12];
|
||||||
|
|
||||||
|
static int index(int i) {
|
||||||
|
if (i == 0) return 0;
|
||||||
|
for (int n = 0; n < array.length; n++)
|
||||||
|
if (i < array[n]) return n;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test(int i) {
|
||||||
|
int result = 0;
|
||||||
|
i = index(i);
|
||||||
|
if (i >= 0)
|
||||||
|
if (array[i] != 0)
|
||||||
|
result++;
|
||||||
|
|
||||||
|
if (i != -1)
|
||||||
|
array[i]++;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
int total = 0;
|
||||||
|
for (int i = 0; i < 100000; i++) {
|
||||||
|
total += test(10);
|
||||||
|
}
|
||||||
|
System.out.println(total);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue