Hi binary-size team,
I would like to enable `-fsanitize=return` globally across all platforms, including those where `optimize_for_size=true`.
CQ shows +24,524 bytes for the Android binary size.
Security Benefits
This sanitizer allows the build to detect when a value-returning function falls off the end of a switch statement that fully enumerates its enum values but lacks a default case.
This specific pattern was responsible for a major past security issue (
crbug/453094710).
Binary Size ImpactThe current observed increase for Android is as follows:
* Android (arm32): +24,524 bytes
* Android (arm64 high end): +366,040 bytes
https://crrev.com/c/7629258While the arm32 increase currently exceeds the 16 KiB limit, we have seen that these figures can change significantly later due to PGO.
Given the high security value of catching these undefined behaviors, is this binary size hit acceptable for all platforms?
I will share the binary size with PGO once it has landed.
Thanks,
Mikihito