United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6251458 : JVM 1.4.2_06 crash in C2 compiler at IdealLoopTree::policy_do_remove_empty_loop

Details
Type:
Bug
Submit Date:
2005-04-06
Status:
Resolved
Updated Date:
2010-12-08
Project Name:
JDK
Resolved Date:
2005-09-08
Component:
hotspot
OS:
solaris_8
Sub-Component:
compiler
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.2_06
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
Crash in complier2 :
 --- called from signal handler with signal -14283264 (SIG Unknown) ---
 fed9ac7c int IdealLoopTree::policy_do_remove_empty_loop(PhaseIdealLoop*) (1301724, 94cfebcc, 1301724, 1, 11b568, 
13035f1) + 8c
 fed9b1c8 void IdealLoopTree::iteration_split_impl(PhaseIdealLoop*,Node_List&) (1301724, 94cfebcc, 94cfeb10, ff1cd
c7c, ff1bee2c, 117e51) + 
c
 fedda768 void IdealLoopTree::iteration_split(PhaseIdealLoop*,Node_List&) (13016ac, 94cfebcc, 94cfeb10, ffffffff, 
fffffff8, 1303890) + 2d8
 fedbf448 PhaseIdealLoop::PhaseIdealLoop #Nvariant 1(PhaseIterGVN&,const PhaseIdealLoop*,int) (ff1cdc7c, 0, 94cfec
14, 1, 1, 1) + dac
 fee012f8 void Compile::Optimize() (94cff500, ff135b44, 94cff414, ff182000, 0, 0) + 600
 fedff70c Compile::Compile(ciEnv*,ciScope*,ciMethod*,int,int,int) (ff135979, 1ce3af4, 3acc8cc, bb9900, ffffffff, 1
) + bac
 fedfbee4 void C2Compiler::compile_method(ciEnv*,ciScope*,ciMethod*,int,int) (35898, 94cffd1c, 0, 1d1ba08, fffffff
f, 0) + 64
 fedfb6a8 void CompileBroker::invoke_compiler_on_method(CompileTask*) (e8c, 0, ffffffff, ff1c0e70, ff1cdc7c, 1247b
8) + 61c
 feeab0f0 void CompileBroker::compiler_thread_loop() (ff136181, ff1c1238, 1247b8, 124d68, 319e24, fee68140) + 428
 fee68168 void JavaThread::run() (1247b8, 8, 40, 0, 40, 0) + 284
 fee64648 _start   (1247b8, ff260e00, 0, 0, 0, 0) + 134
 ff374b90 _lwp_start (0, 0, 0, 0, 0, 0)

the code section that is failing is
The method source:

   From AnnuityConstants class file
   final public static char [] VAR_ANNUITIZED_STATUS = {'O','P','0'};
   final public static char [] FIX_ANNUITIZED_STATUS = {'0'};

   /**
    *Return true if it is a Annutized Contract.
    */
   public boolean isAnnuitized() {

      char [] annuitized = null;
      char contractStatus = ' ';

      if(mAnnuityContract.isVariable()) {
         annuitized = AnnuityConstants.VAR_ANNUITIZED_STATUS;
      } else {
         annuitized = AnnuityConstants.FIX_ANNUITIZED_STATUS;
      }


      try {
         contractStatus = mAnnuityContract.getContractStatus();
      } catch(AnnuityException ae) {
         AnnuityLogger.error(this.getClass().getName(),"isAnnuitized(),
Error occurred while attempting "+
                             "to check Annuitized status or not" + ae,
Layer.LAYER_BUSINESS_LOGIC,
                             AnnuityErrors.GENERIC_EXCEPTION_CODE);
      }

      if(annuitized != null) {
         for(int i = 0; i < annuitized.length; ++i) {
            if(contractStatus == annuitized[i]) {
               return true;
            }
         }
         return false;
      } else
         return false;
   }

We can see that the optimizer might be interested in removing the if
because annuitized can never be null.
Also, since one of the two constant arrays is 1 byte in length, it could
remove the loop  for one of the branches of isVariable()..
The core implied that an empty loop was being removed.


###@###.### 2005-04-06 17:48:39 GMT

                                    

Comments
SUGGESTED FIX

http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2005/20050819150459.nips.bug6251458/workspace/webrevs/webrev-2005.08.19/index.html
                                     
2005-08-22
EVALUATION

Sustaining is looking at using the suggested fix in 1.4.2.  If that solves the customer's problem, we will implement the fix in 1.6.0, also.
###@###.### 2005-04-25 17:44:45 GMT
                                     
2005-04-25



Hardware and Software, Engineered to Work Together