ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandr Kuramshin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-6636) BinaryStream position integer overflow
Date Mon, 16 Oct 2017 11:05:00 GMT
Alexandr Kuramshin created IGNITE-6636:
------------------------------------------

             Summary: BinaryStream position integer overflow
                 Key: IGNITE-6636
                 URL: https://issues.apache.org/jira/browse/IGNITE-6636
             Project: Ignite
          Issue Type: Bug
      Security Level: Public (Viewable by anyone)
          Components: general
    Affects Versions: 2.2
            Reporter: Alexandr Kuramshin


There were some issues with negative {{BinaryAbstractStream#pos}} value.

We may get stack trace like that
{noformat}
java.lang.ArrayIndexOutOfBoundsException: -2142240123
	at org.apache.ignite.internal.binary.streams.BinaryHeapOutputStream.writeByteAndShift(BinaryHeapOutputStream.java)
	at org.apache.ignite.internal.binary.streams.BinaryAbstractOutputStream.writeByte(BinaryAbstractOutputStream.java)
	at org.apache.ignite.internal.binary.BinaryWriterExImpl.marshal0(BinaryWriterExImpl.java)
	at org.apache.ignite.internal.binary.BinaryWriterExImpl.marshal(BinaryWriterExImpl.java)
{noformat}

The worst of it is that the {{ArrayIndexOutOfBoundsException}} has been thrown on the next
write to the stream, and upon stack unwinding we couldn't know which object actually cause
the overflow.

I've to suggest to check all updates to the {{BinaryAbstractStream#pos}} and throw exception
right after the change.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message