Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
vsnprintf return -1 with any buffer size inside separated thread #879
On some Android devices
Steps to reproduce:
Or use this test case https://github.com/formatCvt/android-ndk-vsnprintf-issue
Non-affected devices (tested)
Affected devices (tested):
Affected devices (according to top devices from crashlytics issue):
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.
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