release 2015-06-01
Call CharClassBuilder::RemoveAbove() consistently.

By calling it from Regexp::ParseState::PushRegexp(), we cover every use
of character classes. Previously, Unicode groups were not covered, which
meant that handling them in Latin-1 mode would have bizarre results. As
of this commit, the resulting character classes may be empty and, if so,
simplified to NoMatch. I would argue that this is the expected behaviour
under such nonsensical circumstances.

This bug was discovered by the LLVM fuzzer.

Change-Id: I00e20027045abfbd5d5e0efc56cd33df9c9e4b4f
Reviewed-by: Russ Cox <>
2 files changed