Commit a7ca183f authored by Mika Raento's avatar Mika Raento
Browse files

Validate strided slice output dims in cpu executor

This fixes a buffer overflow in the strided slice cpu implementation.

The strided slice operation has an option to "shrink" an axis, meaning
that a dimension of the input is removed from the output. This requires
the corresponding slice to have size 1. The size constraint was not
checked and unit tests were using a size of 2, leading to an overflow
when executing the op.

TODO: add a test for the validation, b/79856511. I want to get this fix
in ASAP as currently the tests crash in the continuous build so we will
not see other failures.

Bug: 79705516
Test: NeuralNetworksTest_static/*strided_slice* with address sanitizer on marlin-userdebug
Test: NeuralNetworksTest_static/*strided_slice* on marlin-userdebug
Merged-In: I4db9c7460d1c4d943ba7ced36b4d8801d0e0ec99

(cherry picked from commit 7bdc1096)

Change-Id: Icbc0f6eb52fe8fd179c25312aff9d2374ad58679
parent 2627442c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment