Issue Details (XML | Word | Printable)

Key: LUCENE-957
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Doron Cohen
Reporter: Doron Cohen
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

Lucene RAM Directory doesn't work for Index Size > 8 GB

Created: 12/Jul/07 10:51 PM   Updated: 28/Jul/07 01:49 AM
Return to search
Component/s: Store
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works lucene-957.patch 2007-07-15 09:52 PM Doron Cohen 8 kB
Text File Licensed for inclusion in ASF works lucene-957.patch 2007-07-12 11:05 PM Doron Cohen 1 kB

Resolution Date: 19/Jul/07 04:51 PM


 Description  « Hide
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.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order