Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb4b8b58 authored by Ivan Lozano's avatar Ivan Lozano
Browse files

Ignore signed integer overflow in logRound.

There is a potential signed integer overflow in logRound on the return
statement arithmetic which throws an error on integer sanitized builds.

 runtime error: signed integer overflow: 94 * 1000000000 cannot be
 represented in type 'int'

From the comments this looks like this is expected to overflow. For now,
disable sanitization in this function.

Bug: 30969751
Test: Build compiles with and without integer sanitization.
Change-Id: Idfb7eb46ec30f34de75ac3c912760e8fe9525299
parent eda72c27
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ inline int numberWidth(double number, int leftPadding) {
}

// rounds value to precision based on log-distance from mean
__attribute__((no_sanitize("signed-integer-overflow")))
inline double logRound(double x, double mean) {
    // Larger values decrease range of high resolution and prevent overflow
    // of a histogram on the console.