harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Volosyuk (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2976) [drlvm][interpreter] VM crashes instead of throwing NullPointerException
Date Tue, 16 Jan 2007 15:30:27 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465179
] 

Ivan Volosyuk commented on HARMONY-2976:
----------------------------------------

updated version of patch attached.

> [drlvm][interpreter] VM crashes instead of throwing NullPointerException 
> -------------------------------------------------------------------------
>
>                 Key: HARMONY-2976
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2976
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows and Linux
>            Reporter: Vera Petrashkova
>         Assigned To: Gregory Shimansky
>         Attachments: fix-2976.diff, fix-2976_2.diff
>
>
> [drlvm][interpreter] VM crashes instead of throwing NullPointerException if null object
is used for synchronization
> The following test demonstrates that interpreter crashes when object which was not initialized
(null) is used for synchronization.
> -----------------NullSynchTest.java---------------
> public class NullSyncTest {
>     static Object objNull = null;
>     public static void main(String[] args) { 
>         try {
>             syncNull();
>             System.out.println("Test failed: NullPointerException should be thrown");
>         } catch (NullPointerException e) { 
>             System.out.println("Test passed: " + e);
>         } catch (Throwable e) { 
>             e.printStackTrace();
>             System.out.println("Test failed: unexpected " + e);
>         }
>     }
>     public static void syncNull() {
>         synchronized (objNull) {
>             objNull = new Object();
>         }
>     }
> }
> ------------------------
> On Windows this test reports
> An unhandled error (4) has occurred.
> HyGeneric_Signal_Number=00000004
> ExceptionCode=c0000005
> ExceptionAddress=10003974
> ContextFlags=0001003f
> Handler1=00401100
> Handler2=111072C0
> InaccessibleAddress=00000004
> EDI=020A86E0
> ESI=0013F6DC
> EAX=00000004
> EBX=0013F718
> ECX=00000000
> EDX=00000004
> EIP=10003974
> ESP=0013F520
> EBP=0013F634
> Module= ...HYTHR.dll
> On Linux this test finishes with Segmentation fault
> On Jitrino this test passes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message