Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <axI14zIuXGHRsyzW@raf.org>
Date: Fri, 4 Dec 2026 14:39:15 +1100
From: raf <musl@....org>
To: musl@...ts.openwall.com
Subject: Re: Recent fnmatch patches

On Wed, Dec 02, 2026 at 09:49:14PM +1100, raf <musl@....org> wrote:

> Hi,
> 
> I finally had a chance to try out the recent fnmatch patches
> that were posted a while back.
> 
> I used a program that can switch between the system fnmatch and
> an internal copy of the musl version. It was run on an old Debian.
> 
> The test was:
> 
>   touch e é è ê ë
> 
>   echo '# Named character classes'
>   echo glibc fnmatch '[[:lower:]]'
>   RAWHIDE_INTERNAL_GLOB=0 LANG=fr_FR.UTF-8 ./rh -e '"[[:lower:]]"'   
>   echo musl fnmatch '"[[:lower:]]'
>   RAWHIDE_INTERNAL_GLOB=1 LANG=fr_FR.UTF-8 ./rh -e '"[[:lower:]]"'
>   echo
>   echo '# Equivalence class expressions'
>   echo glibc fnmatch '[[=e=]]'
>   RAWHIDE_INTERNAL_GLOB=0 LANG=fr_FR.UTF-8 ./rh -e '"[[=e=]]"'       
>   echo musl fnmatch '[[=e=]]'
>   RAWHIDE_INTERNAL_GLOB=1 LANG=fr_FR.UTF-8 ./rh -e '"[[=e=]]"'
>   echo
>   echo '# Collating symbols'
>   echo glibc fnmatch '[[.e-acute.]]'
>   RAWHIDE_INTERNAL_GLOB=0 LANG=fr_FR.UTF-8 ./rh -e '"[[.e-acute.]]"'
>   echo musl fnmatch '[[.e-acute.]]'
>   RAWHIDE_INTERNAL_GLOB=1 LANG=fr_FR.UTF-8 ./rh -e '"[[.e-acute.]]"'
>   echo
>   echo glibc fnmatch '[[.e.]]'
>   RAWHIDE_INTERNAL_GLOB=0 LANG=fr_FR.UTF-8 ./rh -e '"[[.e.]]"'
>   echo musl fnmatch '[[.e.]]'
>   RAWHIDE_INTERNAL_GLOB=1 LANG=fr_FR.UTF-8 ./rh -e '"[[.e.]]"'
>   echo
>   echo '# Backslash'
>   echo glibc fnmatch '[a\200e]'
>   RAWHIDE_INTERNAL_GLOB=0 LANG=fr_FR.UTF-8 ./rh -e $(printf '"[a\200e]"')
>   echo musl fnmatch '[a\200e]'
>   RAWHIDE_INTERNAL_GLOB=1 LANG=fr_FR.UTF-8 ./rh -e $(printf '"[a\200e]"')
>   echo
> 
>   rm e é è ê ë
> 
> The output was:
> 
>   # Named character classes
>   glibc fnmatch [[:lower:]]
>   ./é
>   ./ë
>   ./e
>   ./è
>   ./ê
>   musl fnmatch "[[:lower:]]
>   ./é
>   ./ë
>   ./e
>   ./è
>   ./ê
> 
>   # Equivalence class expressions
>   glibc fnmatch [[=e=]]
>   ./é
>   ./ë
>   ./e
>   ./è
>   ./ê
>   musl fnmatch [[=e=]]
>   ./e
> 
>   # Collating symbols
>   glibc fnmatch [[.e-acute.]]
>   musl fnmatch [[.e-acute.]]
> 
>   glibc fnmatch [[.e.]]
>   ./e
>   musl fnmatch [[.e.]]
>   ./e
> 
>   # Backslash
>   glibc fnmatch [a\200e]
>   ./e
>   musl fnmatch [a\200e]
>   ./e
> 
> So the only difference is [[=e=]] but I think that's expected
> at the moment. I just thought I'd report what I saw.
> 
> cheers,
> raf

FYI and FWIW, I'm seeing these warnings on Cygwin/Windows10
because wchar_t there is only 16bit. :-( Poor Windows.

rhfnmatch.c:172:30: warning: unsigned conversion from 'int' to 'short unsigned int' changes value from '1114110' to '65534' [-Woverflow]
  172 |         wchar_t ac[3] = { a, 0x10fffe };
      |                              ^~~~~~~~
rhfnmatch.c:173:30: warning: unsigned conversion from 'int' to 'short unsigned int' changes value from '1114111' to '65535' [-Woverflow]
  173 |         wchar_t bc[3] = { b, 0x10ffff };
      |                              ^~~~~~~~

cheers,
raf

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.