Uncategorized

Damnit, why are libraries so good now?

I’m working on some performance code at work to get regular expressions faster. Part of this is that I also have to catch slow regular expressions. In the current system we do this with an alarm() in perl (it has to bypass safe signals because by default Perl won’t interrupt a regexp with an alarm() due to it being unsafe).

However the regular expression libraries I’m working with (pcre and re2) have clever systems for stopping execution of slow regular expressions, and so I cannot make my alarm fire. This makes testing that I’ve got this working awfully difficult!

Damn you libraries, why do you have to be so clever!

Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s