-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boost::regex match but not std::regex #39399
Comments
assigned to @mclow |
Expected Output of the Testcase: Got: |
My first thought was that you had a "high ascii" character in the test case, and that was getting treated differently by the locale. That appears not to be the case. |
I also tried to set the facets one by one. It just triggers at
I also updated the testcase to show how i did it. |
The bug also goes away if i remove the icase flag from the regex. |
Is it specific to the "de_DE.UTF-8" locale, or does it happen with others? |
Check all the characters for tolower On my (Mac OS) machine, the values C0 -> DE are translated. |
Whoops. I sent this to the wrong place. This should have been sent to https://reviews.llvm.org/D55746 instead. It may be related, but that's not for sure yet. |
[expanded testcase that run 192 locales (1 segfaults if i do it) x 3 backends x 12 facets x icase onhttps://user-images.githubusercontent.com/60944935/143758461-cba7d36c-a8ae-4849-88cd-758f0286b165.gz) One locale segfaults, but it is always the facets "all_characters , collation_facet, all_categories". C and POSIX work always ok. |
Pivot Analysis of the result |
I have made a new issue over at the boost.locale repository for what, I am assuming, is this same issue, but on mac, with AppleClang: Using wandbox, you will see the issue does not seem to affect GCC and libstdc++ |
Extended Description
I got the attached program. It has a global locale set (de_DE.UTF-8).
I think it might be a bug in libc++ because
on Windows(MSVC 2013 & MSVC 2017) and on Linux (gcc 8.2 + libstdc++) this regex (from std) matches with the global locale from boost. Also the regex from boost matches (replace std::regex by boost::regex).
This bug triggers only (also on my box and only on freebsd with clang and libc++) when i use boost::locale. With std::locale() it matches.
I already submitted this bug to FreeBSD and to boost.org.
For reference, here are the links
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233994
Boost.locale says:
[quote]
Boost.Regex and Boost.Locale aren't related, the locale generated by Boost.Locale is "C" locale with addons unrelated to Boost.Regex
[/quote]
boostorg/locale#35
FreeBSD says, it is a bug in boost.locale.
As both of my direct upstream bugtrackers seem to "dislike" this bug, i report it to clang/libc++ directly.
The text was updated successfully, but these errors were encountered: