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
vsnprintf return -1 with any buffer size inside separated thread #879
Comments
We've found and fix other bug in our project related to this issue in crashlytics. |
Based on your report, this is either a bug with that specific device or perhaps with android-24, not the NDK. This worked in older NDK releases because libandroid_support used to includes its own implementation of vsnprintf. That implementation was the source of countless other bugs, so it is no longer used. Even if we were to bring that back, libandroid_support is not used for 21+ since it by design overrides system behavior and increases the size of your application, which is generally undesirable. I'd be curious if this affects other android-24 devices or just that one device. |
I tried this on a Chinese 7.0 device, same test case passed smoothly. |
Thanks for the verification. Sounds like this tablet has a broken OS. As noted above, fixing this in the NDK would increase the size of every NDK app on every device, so we won't be fixing this in the NDK. If you want to work around this in your application, in the same way you did on previous NDKs, you could bundle the implementation from the older NDK. Note that it has other bugs though (which will affect all devices), so that may not be what you want. |
According to latest statistics from crashlytics affected devices:
I agree, this list is too short to be fixed in the NDK |
actually, although this isn't a NDK issue, i will add a CTS test for this... |
Description
On some Android devices
vsprintf
return -1 with any buffer size inside separated thread for non-english languages.Steps to reproduce:
Example code:
Or use this test case https://github.com/formatCvt/android-ndk-vsnprintf-issue
Environment Details
Non-affected devices (tested)
Affected devices (tested):
Affected devices (according to top devices from crashlytics issue):
Screenshots:
The text was updated successfully, but these errors were encountered: