Closed frokaikan closed 1 year ago
This is not a bug. You have disobeyed the API. You have set the options PCRE2_UTF and PCRE2_NO_UTF_CHECK and then passed a string that is invalid UTF. This is documented to result in undefined behaviour. The option PCRE2_NO_UTF_CHECK is provided as an optimization for when you are sure the string is valid. If you are generating random strings for fuzzing purposes (for example) you must not set this option.
Here is the code:
and here is the input file: testData.txt
AddressSanitizer reports like this: