Closed Koukyosyumei closed 3 months ago
Could you try PCRE2_MATCH_INVALID_UTF
? Your input does not look like a valid utf, and you PCRE2_NO_UTF_CHECK
as well, so you might get crashes as expected.
Your input is not valid UTF. Without NO_UTF_CHECK you get the error "UTF-8 error: illegal byte (0xfe or 0xff)". If you give invalid UTF to PCRE2 and set PCRE2_NO_UTF_CHECK the result is undefined. This is documented. PCRE2_NO_UTF_CHECK is a dangerous option that should be used only when you know the input is valid - for example, on the second and subsequent times you scan the same subject.
I found a small test case for
pcre2test
that raises a segmentation fault.demo.txt
This input causes the following: