|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81095 Segmentation fault in preg_match
Submitted: 2021-06-01 15:56 UTC Modified: 2021-06-14 11:10 UTC
From: vaclav dot vatoz dot cerny at gmail dot com Assigned:
Status: Closed Package: PCRE related
PHP Version: Irrelevant OS: Debian 10
Private report: No CVE-ID: None
 [2021-06-01 15:56 UTC] vaclav dot vatoz dot cerny at gmail dot com
preg_match on sample data fails with Segmentation fault

Tested under   7.3.19 (debian)  7.4.18  and 8.0.5 (
Test data accesible from from

Test script:
//download test  data from
//and then run

$c=preg_match("!^\X+$!", $b);
echo "OK";

Expected result:
Running code, or error in error log


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-06-01 19:09 UTC]
-Status: Open +Status: Feedback
 [2021-06-01 19:09 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

 [2021-06-13 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2021-06-14 11:10 UTC] vaclav dot vatoz dot cerny at gmail dot com
-Status: No Feedback +Status: Closed
 [2021-06-14 11:10 UTC] vaclav dot vatoz dot cerny at gmail dot com
After update i have tested it in 7.4.20  8.07 7.3.28 and it works )didnt segfault. 
So it might have been corrected in source tree.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Aug 05 02:01:23 2021 UTC