https://bugs.exim.org/show_bug.cgi?id=2447
Bug ID: 2447
Summary: regexec is not thread-safe at regex_t.re_erroffset =
-1
Product: PCRE
Version: N/A
Hardware: All
OS: Linux
Status: NEW
Severity: bug
Priority: medium
Component: Code
Assignee: ph10@???
Reporter: orivej@???
CC: pcre-dev@???
Created attachment 1224
-->
https://bugs.exim.org/attachment.cgi?id=1224&action=edit
regexec re_erroffset fix
regexec is supposed to be safe to use from multiple threads even with the same
regex_t object. (This is why it takes a const regex_t parameter.) However, pcre
casts away the const and modifies its re_erroffset field:
https://vcs.pcre.org/pcre2/code/trunk/src/pcre2posix.c?revision=1064&view=markup&pathrev=1064#l359
This is probably innocuous in reasonable code, but nonetheless it triggers the
thread sanitizer. Would it be possible to fix by the attached patch? Could you
backport the fix to pcre 8?
--
You are receiving this mail because:
You are on the CC list for the bug.