[ 
https://issues.apache.org/jira/browse/LUCENE-4948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Rowe updated LUCENE-4948:
-------------------------------

    Labels: lucene-4.3.1-candidate  (was: )
    
> Stink bug in PostingsHighlighter
> --------------------------------
>
>                 Key: LUCENE-4948
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4948
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/highlighter
>            Reporter: Michael McCandless
>              Labels: lucene-4.3.1-candidate
>             Fix For: 5.0, 4.4
>
>         Attachments: LUCENE-4948.patch, LUCENE-4948.patch
>
>
> This test fail reproduces on IBM J9:
> {noformat}
> NOTE: reproduce with: ant test  -Dtestcase=TestPostingsHighlighter 
> -Dtests.method=testCambridgeMA -Dtests.seed=2A9A93DAC39E0938 
> -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=es_HN 
> -Dtests.timezone=America/Yellowknife -Dtests.file.encoding=UTF-8
> {noformat}
> {noformat}
> Stack Trace:
> java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 37
>         at 
> __randomizedtesting.SeedInfo.seed([2A9A93DAC39E0938:AB8FF071AD305139]:0)
>         at 
> org.apache.lucene.search.postingshighlight.Passage.addMatch(Passage.java:53)
>         at 
> org.apache.lucene.search.postingshighlight.PostingsHighlighter.highlightDoc(PostingsHighlighter.java:547)
>         at 
> org.apache.lucene.search.postingshighlight.PostingsHighlighter.highlightField(PostingsHighlighter.java:425)
>         at 
> org.apache.lucene.search.postingshighlight.PostingsHighlighter.highlightFields(PostingsHighlighter.java:364)
>         at 
> org.apache.lucene.search.postingshighlight.PostingsHighlighter.highlightFields(PostingsHighlighter.java:268)
>         at 
> org.apache.lucene.search.postingshighlight.PostingsHighlighter.highlight(PostingsHighlighter.java:198)
>         at 
> org.apache.lucene.search.postingshighlight.TestPostingsHighlighter.testCambridgeMA(TestPostingsHighlighter.java:373)
> {noformat}
> I think it's because J9 grows arrays in a different progression than other 
> JVMs ... we should fix PostingsHighlighter to forcefully grow the arrays to 
> the same length instead of this:
> {noformat}
>     if (numMatches == matchStarts.length) {
>       matchStarts = ArrayUtil.grow(matchStarts, numMatches+1);
>       matchEnds = ArrayUtil.grow(matchEnds, numMatches+1);
>       BytesRef newMatchTerms[] = new 
> BytesRef[ArrayUtil.oversize(numMatches+1, 
> RamUsageEstimator.NUM_BYTES_OBJECT_REF)];
>       System.arraycopy(matchTerms, 0, newMatchTerms, 0, numMatches);
>       matchTerms = newMatchTerms;
>     }
> {noformat}

--
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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to