We allow users to provide regexps. To avoid them DoSing the bot, we run them in a subprocess, which expensive especially on Windows (and prevents us from using the safer forkserver multiprocessing method on POSIX).
Instead, we could use pyre2 (or its re2 fork).
However, they default to silently falling back to re for regexps that RE2 does not support. re2.set_fallback_notification(re.FALLBACK_EXCEPTION) can prevent it, but it is a global setting that third-party plugins (or even dependencies) may set themselves, so I don't want to rely on it.
We allow users to provide regexps. To avoid them DoSing the bot, we run them in a subprocess, which expensive especially on Windows (and prevents us from using the safer
forkservermultiprocessing method on POSIX).Instead, we could use
pyre2(or itsre2fork).However, they default to silently falling back to
refor regexps that RE2 does not support.re2.set_fallback_notification(re.FALLBACK_EXCEPTION)can prevent it, but it is a global setting that third-party plugins (or even dependencies) may set themselves, so I don't want to rely on it.