Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4546220

Method caller can not catch exception thrown by callee method

XMLWordPrintable

    • jit
    • sparc
    • solaris_2.6

      An exception thrown by callee method can not be caught by caller method,
      but higher caller caught the exception.

      I will explain the attached sample code.

      main() // test.java
       |
       +-- request() // shisanServant.java
             |
             +-- request() // cahikakushisan.java
                    |
                    +-- getCalc() // CCalc.java

      The above represent the caller-callee methods relation(structure).

      When the getCalc()(in CCalc.java) throws COMMError(sub-class of Exception),
      the try-catch block of request() in cahikakushisan.java must catches
      the thrown exception.

      However, higher request() method catches the exception, which is,
      request() in shisanServant.java catches it on Solaris.

      When I tried with -Djava.compiler=NONE, the sample code worked correctly.

      Furthermore, on windows, this code worked well regardless of the property.

      So, this issue looks from JIT of Solaris.


      1. Reproduce

       1) unzip the attached commerror.zip
          -> You can see the commerror dir. is created
       2) Go to the commerror dir.
       3) Invoke test.class by java command, with/without the -Djava.compiler=NONE
          
      2. Configration
       
        - Solaris :
           OS : SunOS goedel 5.7 Generic_106541-15 sun4u sparc SUNW,Ultra-60
           Mem: 256[MB]

           Note)
            The above is my solaris box, but licensee's one is as follows.
            
            MPU: UltraSPARC-II 296[MHz], 2MPU
            Mem: 512[MB]
            OS : Solaris 2.6

        - JDK : 1.2.2-010
        - XML : Java XML Pack Fall 01 Release(jaxp
      1.1.3)

        FYI
        - Windows :
           OS : Windows2000(SP2, japanese)
           Mem: 384[MB]
           MPU: Pentium IV 1.4[GHz]

      3. Result

        I attached the result both with Solaris and windows.


      ================================================================================

            minqi Yumin Qi
            tbaba Tadayuki Baba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: