|
Bug ID:
|
4463485
|
|
Votes
|
1
|
|
Synopsis
|
compilation results in stack overflow while unrolling loop
|
|
Category
|
hotspot:compiler2
|
|
Reported Against
|
ladybird
, merlin-beta2
|
|
Release Fixed
|
1.3.1_12,
1.4(merlin-beta2) (Bug ID:2044057)
|
|
State
|
10-Fix Delivered,
Verified,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
4724509
|
|
Submit Date
|
26-MAY-2001
|
|
Description
|
Compilation results in either compiler thread stack overflow or with
command-line switch -XssNm can result in OutOfMemory error.
Problem occurs during compilation of t1::main in program below:
// ------------------------------------------------------------
// t1.java
class c
{
private int val;
void setVal( int x )
{
this.val = x;
}
}
public class t1
{
public static void main( String[] args )
{
final int n = 100000000;
for ( int i = 0; i < n; i++ ) {
c aC = new c();
aC.setVal( i );
}
}
}
// ------------------------------------------------------------
// WIN32 ===== Ladybird FCS
java -Xbatch t1
CRASH
java -Xbatch -Xss1m t1
OutOfMemory in CompileThread0
The product command line did not result in a crash on Solaris SPARC
// SPARC ===== Current merlin_beta2
Assert in Node::verify_construction "Node limit exceeded" during loop unrolling.
|
|
Work Around
|
1) Use a non-final value for the loop upper bound
2) split the loop into two loop nests with smaller bounds
In general, modify the loop bounds to avoid the overflow condition.
|
|
Evaluation
|
xxxxx@xxxxx 2001-05-25
Checked this in debugger for current merlin_beta2 c2_baseline.
The heuristic for loop unrolling produces a result of -694967296 when a
positive value is expected.
xxxxx@xxxxx 2001-05-30
The fix has been putback to c2_baseline this afternoon.
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|