public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gnugcc at marino dot st" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/67096] New: libstdc++ testsuite, codecvt: many UTF-8 tests illegal (testing bytes 5 and 6) Date: Sun, 02 Aug 2015 13:57:00 -0000 [thread overview] Message-ID: <bug-67096-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67096 Bug ID: 67096 Summary: libstdc++ testsuite, codecvt: many UTF-8 tests illegal (testing bytes 5 and 6) Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: gnugcc at marino dot st Target Milestone: --- Using the pending locale patch set for DragonFly[1], I've been running testsuite frequently. After an update to libc to support LC_CTYPE better, we suffered a large test regression. For example, 22_locale/codecvt/length/wchar_t/4.cc started failing. I modified the test noting that as long as int_type is limited to < 0x200000, the test passes. If it's over 0x200000, it fails. This test, and many similar to it tests: 0x200000 0x400000 0x800000 0x1000000 0x2000000 0x4000000 0x8000000 0x10000000 0x20000000 0x40000000 The reason for the failure is the libc rejects > 4 bytes as illegal, as it should. According to wiki[2]: "The original specification covered numbers up to 31 bits (the original limit of the Universal Character Set). In November 2003, UTF-8 was restricted by RFC 3629 to end at U+10FFFF, in order to match the constraints of the UTF-16 character encoding. This removed all 5- and 6-byte sequences, and about half of the 4-byte sequences." The test is setting the locale to "en_US.UTF-8" which by definition is limited to 4-byte numbers. Thus, testing any number 0x200000 or greater is illegal and should not be done. This probably affects several tests that are making the same mistake. [1] https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02678.html [2] https://en.wikipedia.org/wiki/UTF-8
next reply other threads:[~2015-08-02 13:57 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-02 13:57 gnugcc at marino dot st [this message] 2015-08-02 14:07 ` [Bug libstdc++/67096] " gnugcc at marino dot st 2015-08-03 15:23 ` redi at gcc dot gnu.org 2015-09-11 12:11 ` redi at gcc dot gnu.org 2015-09-11 13:07 ` redi at gcc dot gnu.org 2015-09-11 13:12 ` redi at gcc dot gnu.org 2015-09-13 13:49 ` gnugcc at marino dot st 2015-09-13 16:23 ` gnugcc at marino dot st
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-67096-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).