]> git.ipfire.org Git - thirdparty/vectorscan.git/commit
Fix noodle SVE2 off by one bug 309/head
authorYoan Picchi <yoan.picchi@arm.com>
Wed, 31 Jul 2024 17:13:31 +0000 (17:13 +0000)
committerYoan Picchi <yoan.picchi@arm.com>
Thu, 1 Aug 2024 17:13:34 +0000 (17:13 +0000)
commit48dd0e5ff0bc1995d62461c92cfb76d44d1d0105
treeb121975cd62e7a78c2c244f8bda12f4a51dcaf39
parentb312112e872d5c9c2a70762847c3bd76789dfdcb
Fix noodle SVE2 off by one bug

By using svmatch on 16 bit lanes with a 8 bit predicate, we end up
including an undefined character in the pattern checks. The inactive
lane after load contains an undefined value, usually \0. Patterns
using \0 as the last character would then match this spurious
character, returning a match beyond the buffer's end. The fix checks
for such matches and rejects them.

Signed-off-by: Yoan Picchi <yoan.picchi@arm.com>
src/hwlm/noodle_engine_sve.hpp