pcre compile workspace overflow

Michael Santos <>
Fri Mar 19 02:02:24 CET 2010

A large pattern can overflow the buffer used to hold the compiled
regexp, as reported here:


So, running the following will crash the emulator on some platforms:

N = 819, re:compile([lists:duplicate(N, $(), lists:duplicate(N, $))]).

Here is a patch:

git fetch git://github.com/msantos/otp.git pcre-compile-workspace-overrun

The patch is from:


More information about the erlang-patches mailing list