Re: [pcre-dev] [Bug 1023] Infinite loop in match()

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: 1023
CC: pcre-dev
Subject: Re: [pcre-dev] [Bug 1023] Infinite loop in match()
On Fri, 24 Sep 2010, John Lindal wrote:

> The problem is that I'm using PCRE as the engine for my IDE. Users
> will type in all kinds of crazy. For an invalid expression, they get
> an error message, but for a valid expression, the IDE must not crash.
> Reporting no matches is better than blowing up, so I'll keep
> experimenting with the recursion limit. I understand that the library
> can't do this, so I'm closing as wontfix.


If you really, really mustn't crash, then perhaps you should be setting
a trap for segfault (and other signals), at least while calling PCRE
(perhaps while calling other libraries). After all, it is not unknown
for there to be real bugs in PCRE that cause crashes. (I hope, however,
that such bugs are rare.) Then you could say "Sorry, PCRE has crashed"
to your user.

Philip

--
Philip Hazel