A bug was reported in Android 17 (CP3A.260905.009 / QPR1) where wcscspn() and wcspbrk() incorrectly treat any wide character >= U+0100 as if it matches the reject set. A small C repro shows wcscspn(s, L"x\n") and wcspbrk(s, L"x\n") stop at the U+0100 character instead of skipping it, and a sweep found the behavior for every code point from U+0100 to U+10FFFF. Disassembly of the shipped libc.so revealed three code paths: a simple compare for one-character sets, a 256-byte boolean table for multi-character sets when all set members are in 0x01-0xFF, and a fallback using wcschr() if the set contains code points >= 0x100. The table-scanning path erroneously checks haystack characters against 0x100 and treats any >= 0x100 as if the table entry indicated a match, causing premature stopping.
The thread records developers disassembling binaries because the matching AOSP sources for that release were not yet available, and maintainers acknowledged missing or incorrect tests covering non-ASCII code points. Contributors plan to add tests and attempt backports to affected devices. The conversation also raised broader concerns about source availability and project management after Google changed AOSP release practices; maintainers pointed to official site updates and specific bionic branches but users pressed for timely public sources for released builds.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.