[pcre-dev] [Bug 2447] New: regexec is not thread-safe at re…

Top Page

Reply to this message
Author: admin
To: pcre-dev
Subject: [pcre-dev] [Bug 2447] New: regexec is not thread-safe at regex_t.re_erroffset = -1

            Bug ID: 2447
           Summary: regexec is not thread-safe at regex_t.re_erroffset =
           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:

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.