[
https://issues.apache.org/jira/browse/LUCENE-5066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Muir updated LUCENE-5066:
--------------------------------
Attachment: LUCENE-5066.patch
here's a patch against 4.x
> TestFieldsReader fails in 4.x with OOM
> --------------------------------------
>
> Key: LUCENE-5066
> URL: https://issues.apache.org/jira/browse/LUCENE-5066
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-5066.patch
>
>
> Its FaultyIndexInput is broken (doesn't implement seek/clone correctly).
> This causes it to read bogus data and try to allocate an enormous byte[] for
> a term.
> The bug was previously hidden:
> FaultyDirectory doesnt override openSlice, so CFS must not be used at flush
> if you want to trigger the bug.
> FailtyIndexInput's clone is broken, it uses "new" but doesn't seek the clone
> to the right place. This causes a disaster with BufferedIndexInput (which it
> extends), because BufferedIndexInput (not just the delegate) must "know" its
> position since it has seek-within-block etc code...
> It seems with this test (very simple one), that only 3.x codec triggers it
> because its term dict relies upon clone()'s being seek'd to right place.
> I'm not sure what other codecs rely upon this, but imo we should also add a
> low-level test for directories that does something like this to ensure its
> really tested:
> {code}
> dir.createOutput(x);
> dir.openInput(x);
> input.seek(somewhere);
> clone = input.clone();
> assertEquals(somewhere, clone.getFilePointer());
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]