You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/07/07 22:34:30 UTC

[jira] Resolved: (HARMONY-794) [classlib][nio]Harmony crashes on java.nio.ByteBuffer.getDouble(Integer.MAX_VALUE) instead of throwing IndexOutOfBoundateException

     [ http://issues.apache.org/jira/browse/HARMONY-794?page=all ]
     
Tim Ellison resolved HARMONY-794:
---------------------------------

    Resolution: Fixed

Thanks Vladimir,

Applied a slightly modified version of your patch to the NIO modue at repo revision r419972.

Please check that this fully resolves your issue.


> [classlib][nio]Harmony crashes on java.nio.ByteBuffer.getDouble(Integer.MAX_VALUE) instead of throwing IndexOutOfBoundateException
> ----------------------------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-794
>          URL: http://issues.apache.org/jira/browse/HARMONY-794
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Vladimir Ivanov
>     Assignee: Tim Ellison
>  Attachments: ByteBufferTest.patch, DirectByteBuffer.patch, DirectByteBuffer.patch, ReadWriteDirectByteBuffer.patch, ReadWriteDirectByteBuffer.patch
>
> The Harmony crashes on java.nio.ByteBuffer.getDouble(Integer.MAX_VALUE) instead of throwing IndexOutOfBoundateException.
> Methods getInt(Integer.MAX_VALUE), putChar(Integer.MAX_VALUE, 'h') crash java machine as well.
> =========================== test.java ============================
> public class test  { 
>     public static void main (String[] args) {   
>         try {                                   
>             System.out.println("double = " + ByteBuffer.allocateDirect(16).getDouble(Integer.MAX_VALUE));
> //            System.out.println("double = " + ByteBuffer.allocateDirect(16).getInt(Integer.MAX_VALUE));
> //            System.out.println("double = " + ByteBuffer.allocateDirect(16).putChar(Integer.MAX_VALUE, 'h'));
>         } catch (Exception e) {
>            e.printStackTrace();
>         }    
>     }
> }
> ==============================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> java.lang.IndexOutOfBoundsException
>         at java.nio.Buffer.checkIndex(II)I(Unknown Source)
>         at java.nio.DirectByteBuffer.getDouble(I)D(Unknown Source)
>         at test.main(test.java:6)
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> Unhandled exception
> Type=Segmentation error vmState=0x00040000
> Target=2_30_20060220_05389_lHdSMR (Windows XP 5.1 build 2600 Service Pack 2)
> CPU=x86 (1 logical CPUs) (0x7feec000 RAM)
> J9Generic_Signal_Number=00000004 ExceptionCode=c0000005 ExceptionAddress=003EDDD4 ContextFlags=0001003f
> Handler1=7FE5FED0 Handler2=7FD16E50 InaccessibleAddress=8150FFEF
> EDI=0013F7F4 ESI=00000020 EAX=003EDDD0 EBX=00000000
> ECX=8150FFEF EDX=00000008
> EIP=003EDDD4 ESP=0013F7F0 EBP=0013F970
> Module=C:\harmony\trunk_0427\deploy\jdk\jre\bin\hyluni.dll
> Module_base_address=003E0000 Offset_in_DLL=0000ddd4
> JavaVMInitArgs.nOptions=9:
>     -Dcom.ibm.oti.vm.vmdir=C:\harmony\trunk_0427\deploy\jdk\jre\bin\default\
>     -Dcom.ibm.oti.vm.exe=C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe
>     -Dcom.ibm.oti.vm.bootstrap.library.path=C:\harmony\trunk_0427\deploy\jdk\jre\bin;C:\harmony\trunk_0427\deploy\jdk\jre\bin\default
>     -Xbootclasspath/p:C:\harmony\trunk_0427\deploy\jdk\jre\bin\default\luni-kernel.jar;C:\harmony\trunk_0427\deploy\jdk\jre\bin\default\security-kerne
> l.jar
>     -Djava.home=C:\harmony\trunk_0427\deploy\jdk\jre
>     -Djava.library.path=C:\harmony\trunk_0427\deploy\jdk\jre\bin\;.;C:\harmony\trunk_0427\deploy\jdk\jre\bin\default;C:\Program Files\Far;C:\PROGRAM F
> ILES\THINKPAD\UTILITIES;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\PC-Doctor for Windows\services;C:\Program Files\ATI Technol
> ogies\ATI Control Panel;C:\Program Files\ATI Technologies\Fire GL 3D Studio Max;C:\PROGRA~1\F-Secure\ssh;C:\Cygwin\bin;C:\Perl\Bin;C:\jrockit-jdk1.5.0
> -windows-ia32\bin;C:\work\VTSTeam\dist\apache-ant-1.6.5\bin;C:\Program Files\Intel\CPP\Compiler80\Ia32\Bin;C:\Program Files\Intel\CPP\IDB80\Bin;C:\Pro
> gram Files\Microsoft Visual Studio .NET 2003\Vc7\bin;C:\SFU\Perl\bin\;C:\SFU\common\;C:\Program Files\Intel\Compiler\C++\9.0\IA32\Bin;C:\Program Files
> \Microsoft Visual Studio .NET 2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NE
> T 2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual Studio .NET 200
> 3\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\bin;C:\WINNT\Microsoft.NET\Framework\v1.1.4322;C:\ORP\last\bin;C:\Cygw
> in\lib\subversion\bin
>     -Djava.class.path=.
>     _org.apache.harmony.vmi.portlib (extra info: 0013FBC4)
>     -Xjcl:jclclear_23
> ^CTerminate batch job (Y/N)? ^C
> C:\tmp\tmp17>C:\harmony\drlvm\trunk\build\win_ia32_msvc_release\deploy\jre\bin\ij -showversion test
> Apache Harmony DRLVM HEAD-4807 (2006-05-02), Windows/ia32/msvc 1310, release
> <crash>

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