When IABot is analyzing the page Afghanistan on the English Wikipedia, PHP experiences a segmentation fault.
This fault occurs on Linux, Mac, and Windows.
When IABot is analyzing the page Afghanistan on the English Wikipedia, PHP experiences a segmentation fault.
This fault occurs on Linux, Mac, and Windows.
It appears to be caused by
$text = preg_replace( '/\<\s*nowiki(?:.|\n)*?\<\/nowiki\s*\>/i', "", $text );
in the filterText function.
Regex 101 is reporting that some kind of catastrophic backtracking is occurring during the matching process. It appears to be a "runaway regex".
The regex itself is doing the intended job, but the article is to large to handle. It picks up the spurious tag and the tries to find the closing tag, Firstly because the spurious tag is using invalid syntax. At some point it just runs too long and segfaults.
I think this can easily be fixed by verifying the presence of both tags before running this regex.