From 63fefe32e7e40efe1050c1908422b29e883c0575 Mon Sep 17 00:00:00 2001 From: "Soni L." Date: Fri, 9 Aug 2024 19:29:59 -0300 Subject: Harden against invalid alignment (#2411) --- test/regress/undefined-shifts.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/regress/undefined-shifts.txt (limited to 'test/regress') diff --git a/test/regress/undefined-shifts.txt b/test/regress/undefined-shifts.txt new file mode 100644 index 00000000..6bfc3c3d --- /dev/null +++ b/test/regress/undefined-shifts.txt @@ -0,0 +1,21 @@ +;;; TOOL: run-gen-wasm-bad +;;; ARGS1: --enable-multi-memory +;;; ARGS2: --enable-multi-memory +magic +version +section(TYPE) { count[1] function params[0] results[0] } +section(FUNCTION) { count[1] type[0] } +section(MEMORY) { count[1] flags[0] min[1] } +section(CODE) { + count[1] + func { + locals[0] + i32.const leb_u32(0) + i32.load align[63] offset[0] + drop + } +} +(;; STDERR ;;; +0000020: error: invalid load alignment: 63 +0000020: error: invalid load alignment: 63 +;;; STDERR ;;) -- cgit v1.2.3