-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove musl stdio from libandroid_support.
Historically this is where the libandroid_support bugs are. The only things we lose by dropping this is support for %a in printf and functioning versions of *wprintf functions. Parts of libc++ that rely on the former are just being marked XFAIL for the moment (it's only needed for serialization of RNG state to stringstreams, something that doesn't seem all that important). We'll pick up Bionic's *sprintf family later to fix this. We've actually had definitions for the latter forever, but they just return -1 and set errno to ENOTSUP. The functions existing but not working actually causes std::to_wstring to OOM (it allocates an increasingly large wstring until it finds one that doesn't fail, and never does), which in turn causes OOM killer to kill the device. We can avoid this by implementing swprintf in terms of snprintf, using wcsrtombs and mbsrtowcs to translate. The only thing that doesn't work in this case is %ls. Since we're delegating to the device's snprintf, that will not work on old devices, but will work on new devices, so this only improves functionality. We need to pull in part of bionic's wide character implementation for this, because musl's isn't correct. Also disable a %a test for pre-L. We didn't have support for this until L, and it's temporarily being removed from libandroid_support. Test: ./checkbuild.py && ./run_tests.py Bug: android/ndk#300 Bug: android/ndk#437 Change-Id: Ic70c0d3f6f439de2e1c19027ec4fd3d37b766f77
- Loading branch information
Showing
57 changed files
with
411 additions
and
2,175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.