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

Commit 9a2094d1 authored by Ivan Lozano's avatar Ivan Lozano
Browse files

Disable integer sanitizer in release function.

EphemeralStorage::release was causing an unsigned integer overflow on
boot due to the way the for loop is constructed. This function doesn't
need to be sanitized. This adds the no_sanitize attribute to the
function.

Bug: 30969751
Test: Compiles and device boots without runtime error.
Change-Id: Id28a2891624c1fe077fa5e27051540a39e33fe71
parent 8cf645c0
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -111,6 +111,7 @@ DEFINE_ALLOC_VECTOR_METHODS(Double,jdouble,Double)
                break;                                                         \
                break;                                                         \
            }
            }


__attribute__((no_sanitize("unsigned-integer-overflow")))
void EphemeralStorage::release(JNIEnv *env) {
void EphemeralStorage::release(JNIEnv *env) {
    for (size_t i = mItems.size(); i--;) {
    for (size_t i = mItems.size(); i--;) {
        const Item &item = mItems[i];
        const Item &item = mItems[i];