lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-957) Lucene RAM Directory doesn't work for Index Size > 8 GB
Date Thu, 12 Jul 2007 22:53:04 GMT
Lucene RAM Directory doesn't work for Index Size > 8 GB
-------------------------------------------------------

                 Key: LUCENE-957
                 URL: https://issues.apache.org/jira/browse/LUCENE-957
             Project: Lucene - Java
          Issue Type: Bug
          Components: Store
            Reporter: Doron Cohen
            Assignee: Doron Cohen


from user list - http://www.gossamer-threads.com/lists/lucene/java-user/50982

Problem seems to be casting issues in RAMInputStream.

Line 90:
      bufferStart = BUFFER_SIZE * currentBufferIndex;
both rhs are ints while lhs is long.
so a very large product would first overflow MAX_INT, become negative, and only then (auto)
casted to long, but this is too late. 

Line 91: 
     bufferLength = (int) (length - bufferStart);
both rhs are longs while lhs is int.
so the (int) cast result may turn negative and the logic that follows would be wrong.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message