Tue, 18 Mar 2008 23:54:17 -0700
6659207: access violation in CompilerThread0
Summary: split_thru_phi produces top on a non-dead path
Reviewed-by: kvn, rasbold, sgoldman
src/share/vm/opto/loopopts.cpp | file | annotate | diff | comparison | revisions | |
test/compiler/6659207/Test.java | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/loopopts.cpp Tue Mar 18 23:44:46 2008 -0700 1.2 +++ b/src/share/vm/opto/loopopts.cpp Tue Mar 18 23:54:17 2008 -0700 1.3 @@ -29,6 +29,11 @@ 1.4 //------------------------------split_thru_phi--------------------------------- 1.5 // Split Node 'n' through merge point if there is enough win. 1.6 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) { 1.7 + if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) { 1.8 + // ConvI2L may have type information on it which is unsafe to push up 1.9 + // so disable this for now 1.10 + return NULL; 1.11 + } 1.12 int wins = 0; 1.13 assert( !n->is_CFG(), "" ); 1.14 assert( region->is_Region(), "" );
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/test/compiler/6659207/Test.java Tue Mar 18 23:54:17 2008 -0700 2.3 @@ -0,0 +1,60 @@ 2.4 +/* 2.5 + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 2.6 + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 2.7 + * 2.8 + * 2.9 + * 2.10 + * 2.11 + * 2.12 + * 2.13 + * 2.14 + * 2.15 + * 2.16 + * 2.17 + * 2.18 + * 2.19 + * 2.20 + * 2.21 + * 2.22 + * 2.23 + * 2.24 + * 2.25 + */ 2.26 + 2.27 +/* 2.28 + * @test 2.29 + * @bug 6659207 2.30 + * @summary access violation in CompilerThread0 2.31 + */ 2.32 + 2.33 +public class Test { 2.34 + static int[] array = new int[12]; 2.35 + 2.36 + static int index(int i) { 2.37 + if (i == 0) return 0; 2.38 + for (int n = 0; n < array.length; n++) 2.39 + if (i < array[n]) return n; 2.40 + return -1; 2.41 + } 2.42 + 2.43 + static int test(int i) { 2.44 + int result = 0; 2.45 + i = index(i); 2.46 + if (i >= 0) 2.47 + if (array[i] != 0) 2.48 + result++; 2.49 + 2.50 + if (i != -1) 2.51 + array[i]++; 2.52 + 2.53 + return result; 2.54 + } 2.55 + 2.56 + public static void main(String[] args) { 2.57 + int total = 0; 2.58 + for (int i = 0; i < 100000; i++) { 2.59 + total += test(10); 2.60 + } 2.61 + System.out.println(total); 2.62 + } 2.63 +}