✓ AI-Debiased Article
Rewritten from Hacker News — Front Page • • 2 min read
4 Wire-neutral provisional

✓ No loaded language, vague sourcing, or framing detected.

Developers Report Bugs in Android 17 Builds Due to Library Issues

Developers have reported issues with Android 17 builds from September 2026, specifically with functions wcscspn() and wcspbrk(), which incorrectly handle certain character sets. This has led to problems in applications that rely on these functions. Concerns have also been raised about the management of the AOSP project and the lack of transparency from Google regarding source code availability.

Companies
Google

On Android 17 builds from September 2026, functions wcscspn() and wcspbrk() stop at the first character of the string that is greater than or equal to U+0100 whenever the reject set has two or more characters that are all less than U+0100. The character is reported as a match even though it is not in the set. Other functions such as wcsspn(), wcschr(), wcsrchr(), wmemchr(), and wcsstr() are functioning correctly.

Any code that scans wide strings for ASCII delimiters, such as newline or wildcard characters, fails when the text contains an emoji, CJK, Cyrillic, Greek, or Latin Extended character.

The public android17-release sources (android-17.0.0_r1, June 2026) build wcscspn and wcspbrk from external/llvm-libc, which is a plain nested loop over wchar_t and is correct. However, the code on the September builds is different, indicating that the regression was introduced between the June and September releases.

A test conducted with the NDK (aarch64-linux-android30-clang) shows that a sweep of every code point from U+0001 to U+10FFFF (skipping surrogates and the two set members) with wcscspn(L"<cp>\n", L"x\n") returns 0 instead of 1 for 1,111,808 code points: every one from U+0100 to U+10FFFF. The outputs from U+0001 to U+00FF are correct.

The disassembly of wcscspn in /apex/com.android.runtime/lib64/bionic/libc.so on CP3A.260905.009 shows that a character greater than or equal to 0x100 cannot be in a set whose members are all less than 0x100, so for wcscspn, the scan must continue past it. The code stops instead. The function wcsspn has the same structure, and stopping is the correct answer in that case. The function wcspbrk is implemented on top of this scan and inherits the bug.

The existing bionic test TEST(wchar, wcspbrk) in tests/wchar_test.cpp only uses ASCII input, so it does not catch this issue. A test such as EXPECT_EQ(3u, wcscspn(L"aĀb\n", L"x\n")) would identify the problem.

Visual Pinball on Android (libwinevbs, a Unix build of Wine's vbscript engine) stopped loading any table whose VBScript source contains a comment with an emoji after the September update. The lexer uses wcspbrk(ptr, L"\n\r") to skip comments, but it got the position of the first emoji instead of the line end, leading to an "Invalid character" error. FileSystem.MoveFolder also treated every path containing a character greater than or equal to U+0100 as a wildcard pattern via wcspbrk(src, L"*?><").

This issue has been worked around by replacing the calls with plain loops as noted in the GitHub issue vpinball/libwinevbs#41.

Full disassembly of the affected functions and the probe sources are available upon request. Developers have expressed concerns regarding the management of the AOSP project and the lack of transparency from Google, particularly after the closure of AOSP source code. Official communication regarding these topics can be found at source.android.com.

The source code for Android 17 QPR1, which is currently running on Pixel devices, has not yet been made available. Developers are seeking a better location to discuss these general issues.

Annotating as

No note attached

on this article.

Original vs. Neutral

Original Headline

AOSP Source Releases Are So Late Developers Disassemble Libraries to Report Bugs

Neutral Headline

Developers Report Bugs in Android 17 Builds Due to Library Issues