[Bug libc/34526] rpmatch is not thread-safe

fweimer at redhat dot com via Glibc-bugs <[email protected]>
Newsgroups gmane.comp.lib.glibc.bugs
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34526

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |2.45
         Resolution|---                         |FIXED

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for 2.45 via:

commit 6144ef08960e1db191db2054abef02d361042018
Author: Florian Weimer <[email protected]>
Date:   Sat Aug 15 12:36:16 2026 +0200

    stdlib: Remove cache from rpmatch (bug 34526)

    It is not thread-safe.  Furthermore, the cache invalidation logic did
    not account for deallocation in uselocale (which could change the regexp
    without changing its pointer).

    Given that this code is unlikely to be performance-senstive
    (it is for interactive use) and the regular expressions are very
    short, allocate and deallocate the regular expressions on each
    call.

    Reviewed-by: Collin Funk <[email protected]>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.