Segmentation fault using regular expressions

F

fritz-bayer

Hi,

running regular expressions against many different HTML pages
somethimes causes a segmentation fault. This happens fairly seldom.

That the regular expression cannot be evaluate is actually not bad for
the program itself. But that the program itself terminates is. I have
wondering whether or not there exists some way of catching this error
in perl?

fritz
 
T

Tad McClellan

running regular expressions against many different HTML pages
somethimes causes a segmentation fault.


Then don't do that.

It is a kludge anyway.

Use a module that understands HTML for processing HTML data.
 
P

Peter Scott

running regular expressions against many different HTML pages
somethimes causes a segmentation fault. This happens fairly seldom.

If you can come up with a short example that is repeatable on the latest
version of Perl, you can use perlbug to report it. Regardless of the
advisability of your solution to a problem, Perl should never segfault on
a regex match (excepting various very obvious boundary cases).
That the regular expression cannot be evaluate is actually not bad for
the program itself. But that the program itself terminates is. I have
wondering whether or not there exists some way of catching this error
in perl?

You wouldn't want to try. If a segfault has happened, Perl is going to be
in an inconsistent internal state and couldn't be counted on to do
anything right anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top