We're updating the issue view to help you get more done. 

AffixTokenMatcherWarehouse must deal with OOM

Description

In case of out-of-memory, this code will SIGSEGV when create() returns nullptr:

1 2 3 NumberParseMatcher& AffixTokenMatcherWarehouse::nextCodePointMatcher(UChar32 cp) { return *fCodePoints.create(cp); }

(That code was added by commit 9de0383 which made it very clear that memory allocation errors aren't handled here, but the code that was replaced didn't handle OOM gracefully either and just buried the problem where it wasn't as easy to see.)

Environment

Status

Assignee

Shane Carr

Reporter

Fredrik Roubert

Labels

Time Needed

Hours

Reviewer

Fredrik Roubert

Components

Fix versions

Priority

medium