commit | 70ddabcd07e79cdc5409e286aaf4aaea5b202b7a | [log] [tgz] |
---|---|---|
author | Michele Di Giorgio <michele.digiorgio@arm.com> | Thu Oct 29 15:32:45 2020 +0000 |
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | Fri Oct 30 16:58:36 2020 +0000 |
tree | 4ce452d7158d9287f6242c6669cbb076f0124aab | |
parent | 839e19865d4b654899d1da5cfb94304841e7f210 [diff] |
COMPMID-3926: Floor CTS failing in Neon Depending n the value of `len`, the left-over loop might end up writing/reading out-of-bounds, therefore corrupting the memory. Change-Id: I1b0bb300f3e5ea668b585266e1aa6af7f93a5d1e Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4290 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Manuel Bottini <manuel.bottini@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/core/NEON/kernels/floor/impl/fp16_neon_floor.cpp b/src/core/NEON/kernels/floor/impl/fp16_neon_floor.cpp index 3222fa9..f0d9efb 100644 --- a/src/core/NEON/kernels/floor/impl/fp16_neon_floor.cpp +++ b/src/core/NEON/kernels/floor/impl/fp16_neon_floor.cpp
@@ -53,7 +53,7 @@ pdst += step; } - for(; len >= 0; --len) + for(; len > 0; --len) { *pdst++ = std::floor(*psrc++); }
diff --git a/src/core/NEON/kernels/floor/impl/fp32_neon_floor.cpp b/src/core/NEON/kernels/floor/impl/fp32_neon_floor.cpp index dba61e1..7a99988 100644 --- a/src/core/NEON/kernels/floor/impl/fp32_neon_floor.cpp +++ b/src/core/NEON/kernels/floor/impl/fp32_neon_floor.cpp
@@ -51,7 +51,7 @@ pdst += step; } - for(; len >= 0; --len) + for(; len > 0; --len) { *pdst++ = std::floor(*psrc++); }