lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] [Commented] (LUCENE-5659) SpecialOperations.isFinite hits StackOverflowError on automaton accepting long strings
Date Sat, 10 May 2014 22:16:33 GMT


Michael McCandless commented on LUCENE-5659:

The problem I hit was a StackOverflowError when testing AnalyzingSuggester on a "big" suggestion.

But, it's just because that suggester calls .isFinite from an assert; I can just remove the
assert instead.

Also, for some reason, the test only seems to fail on Java 8; I'm not sure if that version
allocates less stack by default, or maybe just something about this test env (maybe it passes
a too-small -Xss or something).

We also call isFinite in CompiledAutomaton, whenever we run any AutomatonQuery (e.g. FuzzyQuery,
RegexpQuery, etc.), but likely those automata are tiny and wouldn't overflow stack.

So net/net I'm OK with not doing this and just removing AnalyzingSuggester's assert instead.

> SpecialOperations.isFinite hits StackOverflowError on automaton accepting long strings
> --------------------------------------------------------------------------------------
>                 Key: LUCENE-5659
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 4.9, 5.0
>         Attachments: LUCENE-5659.patch
> Just like we fixed getFiniteStrings to not consume stack in proportion to the longest
string accepted by the automaton (LUCENE-5628), isFinite has the same limitation.  The fix
is pretty simple; I just share the code from getFiniteStrings, but allocate two BitSets up
front like the current impl.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message