You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Markov (JIRA)" <ji...@apache.org> on 2007/12/21 21:45:43 UTC
[jira] Created: (HARMONY-5336) [classlib][luni] StackOverflow in
DataInputStream.readUTF(DataInput)
[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
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.
[jira] Closed: (HARMONY-5336) [classlib][luni] StackOverflow in
DataInputStream.readUTF(DataInput)
Posted by "Mikhail Markov (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (HARMONY-5336) [classlib][luni] StackOverflow in
DataInputStream.readUTF(DataInput)
Posted by "Mikhail Markov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Markov updated HARMONY-5336:
------------------------------------
Attachment: H-5336.patch
Here is the patch fixing the issue.
> [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.