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. TODO: cherry-pick to pi-dev - the test crash is in master and I want to verify it is fixed. Bug: 79705516 Test: NeuralNetworksTest_static/*strided_slice* with address sanitizer on marlin-userdebug Test: NeuralNetworksTest_static/*strided_slice* on marlin-userdebug Change-Id: I4db9c7460d1c4d943ba7ced36b4d8801d0e0ec99
Loading
Please sign in to comment