Conversation

That's fascinating :O However I built this library myself, from the same cmake build that built the rest of the apk so's, and UBSAN definitely should not be on. I'm not familiar with FORTIFY_SOURCE… :(
2
_FORTIFY_SOURCE uses __builtin_object_size to do bounds checking for writes (in glibc) or both reads and writes (in Bionic) based on compiler detection of object sizes. I think you have some kind of issue where the code is being built for a newer API than you're using it with.
2
2
I'm building for min sdk 21 target sdk 26, which I should go back and double check but I believe is the recommended numbers for the hardware platform I'm targeting. I haven't upgraded the ndk in a while, I'll try that. Thanks.
1
It's a security feature. It generally hardly adds any overhead since the detected size is always a compile-time constant and if it can't detect one at compile-time it doesn't use it. Generally only enabled when optimization is enabled since it depends on that to detect the sizes.
2
1
Don't really understand how you're having problems since you don't seem to be in the niche scenario where that off-by-one error in the compile-time version check would matter. I'm also curious if that has to do with the patch being delayed and missing a whole release. *shrug*
1
As opposed to glibc where you have to build against the oldest glibc version you want to support, with Bionic, you can use the latest NDK and Bionic to build for an ancient release since they have these version checks. I guess it was screwed up for this specific symbol though.
1
Show replies