commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #3159] Fixes for bugs in gnu.java.nio.channels.FileChannelImpl.re


From: Mark Wielaard
Subject: [patch #3159] Fixes for bugs in gnu.java.nio.channels.FileChannelImpl.read/write
Date: Sun, 04 Jul 2004 16:53:19 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Galeon/1.3.15 (Debian package 1.3.15-2)

This mail is an automated notification from the patch tracker
 of the project: classpath.

/**************************************************************************/
[patch #3159] Latest Modifications:

Changes by: 
                Mark Wielaard <address@hidden>
'Date: 
                Sun 07/04/04 at 20:50 (Europe/Amsterdam)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
         Assigned to | None                      | mark
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
Thanks these look obviously correct. Regtested and applied as follows:

2004-07-04  Stephen Crawley <address@hidden>

        * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
        (Java_gnu_java_nio_channels_FileChannelImpl_read___3BII):
        Check zero length early.
        (Java_gnu_java_nio_channels_FileChannelImpl_write___3BII):
        Check zero length early. Return immediatly when exception is thrown.







/**************************************************************************/
[patch #3159] Full Item Snapshot:

URL: <http://savannah.gnu.org/patch/?func=detailitem&item_id=3159>
Project: classpath
Submitted by: Stephen Crawley
On: Wed 06/23/04 at 15:27

Category:  None
Priority:  5 - Normal
Resolution:  Fixed
Assigned to:  mark
Originator Email:  
Status:  Closed


Summary:  Fixes for bugs in gnu.java.nio.channels.FileChannelImpl.read/write

Original Submission:  The three argument read and write native methods may
throw IOException("Unexpected JNI error") when passed
a zero byte buffer (and length 0).  This is because the
behaviour of the JNI GetByteArrayElements call is 
unspecified for a zero length array, and some VMs treat
this as a JNI failure.

The patch also fixes a possible memory leak in 'read' 
and a couple of possible segfaults in 'write', all caused 
by incorrect error handling.

2004-06-21  Stephen Crawley  <address@hidden>
  * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
  (Java_gnu_java_nio_channels_FileChannelImpl_read___3BII):
  handle zero length reads, and fix associated memory leak
  (Java_gnu_java_nio_channels_FileChannelImpl_write___3BII):
  handle zero length writes, and fix error handling bugs.

        


Follow-up Comments
------------------


-------------------------------------------------------
Date: Sun 07/04/04 at 20:50         By: mark
Thanks these look obviously correct. Regtested and applied as follows:

2004-07-04  Stephen Crawley <address@hidden>

        * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
        (Java_gnu_java_nio_channels_FileChannelImpl_read___3BII):
        Check zero length early.
        (Java_gnu_java_nio_channels_FileChannelImpl_write___3BII):
        Check zero length early. Return immediatly when exception is thrown.





CC List
-------

CC Address                          | Comment
------------------------------------+-----------------------------
stevenaugart<augart --AT-- watson --DOT-- ibm --DOT-- com> | 



File Attachments
-------------------

-------------------------------------------------------
Date: Wed 06/23/04 at 15:27  Name: diffs  Size: 1.83KB   By: crawley

http://savannah.gnu.org/patch/download.php?item_id=3159&amp;item_file_id=3392






For detailed info, follow this link:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=3159>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]