wmbus: fix format-A length formula for L=10 (mod 16); host tests under ASan
This commit is contained in:
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build and run the host-side wM-Bus frame tests under AddressSanitizer.
|
||||
# The sanitizer is the point: these tests feed adversarial lengths through
|
||||
# the CRC walk, and only ASan makes an out-of-bounds read observable.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
CC=${CC:-gcc}
|
||||
OUT=$(mktemp -d)
|
||||
trap 'rm -rf "$OUT"' EXIT
|
||||
|
||||
"$CC" -std=c11 -O1 -g -Wall -Wextra -Werror \
|
||||
-fsanitize=address,undefined -fno-omit-frame-pointer \
|
||||
-o "$OUT/test_wmbus" test_wmbus.c ../main/wmbus.c
|
||||
|
||||
"$OUT/test_wmbus"
|
||||
Reference in New Issue
Block a user