harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-5336) [classlib][luni] StackOverflow in DataInputStream.readUTF(DataInput)
Date Mon, 24 Dec 2007 19:01:43 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mikhail Markov closed HARMONY-5336.
-----------------------------------

    Resolution: Fixed

Fix committed in r606724.

> [classlib][luni] StackOverflow in DataInputStream.readUTF(DataInput)
> --------------------------------------------------------------------
>
>                 Key: HARMONY-5336
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5336
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>         Environment: Linux
>            Reporter: Mikhail Markov
>            Assignee: Mikhail Markov
>         Attachments: H-5336.patch
>
>
> The following test leads to stack overflow on Harmony, but works ok on RI:
> import java.io.DataInput;
> import java.io.DataInputStream;
> import java.io.IOException;
> public class Test {
>     public static void main(String[] args) throws Exception {
>         new MyDataInputStream().readUTF();
>     }
>     static class MyDataInputStream implements DataInput {
>         public boolean readBoolean() throws IOException {
>             return false;
>         }
>         public byte readByte() throws IOException {
>             return (byte) 0;
>         }
>         public char readChar() throws IOException {
>             return (char) 0;
>         }
>         public double readDouble() throws IOException {
>             return 0.0;
>         }
>         public float readFloat() throws IOException {
>             return (float) 0.0;
>         }
>         public void readFully(byte[] buffer) throws IOException {
>         }
>         public void readFully(byte[] buffer, int offset, int count)
>             throws IOException {
>         }
>         public int readInt() throws IOException {
>             return 0;
>         }
>         public String readLine() throws IOException {
>             return null;
>         }
>         public long readLong() throws IOException {
>             return (long) 0;
>         }
>         public short readShort() throws IOException {
>             return (short) 0;
>         }
>         public int readUnsignedByte() throws IOException {
>             return 0;
>         }
>         public int readUnsignedShort() throws IOException {
>             return 0;
>         }
>         public String readUTF() throws IOException {
>             return DataInputStream.readUTF(this);
>         }
>         public int skipBytes(int count) throws IOException {
>             return 0;
>         }
>     }
> }
> readUTF(DataInput in) static method of DataInputStream just calls 'return in.readUTF();'
which lead to this problem. I'll provide the patch soon.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message