diff --git a/test/integer_overflow/blit_1bpp_overflow.wat b/test/integer_overflow/blit_1bpp_overflow.wat new file mode 100644 index 00000000..b400d3a6 --- /dev/null +++ b/test/integer_overflow/blit_1bpp_overflow.wat @@ -0,0 +1,13 @@ +(module + (func $blit (import "env" "blit") (param i32 i32 i32 i32 i32 i32)) + (memory (import "env" "memory") 1 1) + (func (export "update") + i32.const 0 + i32.const 0 + i32.const 0 + i32.const 0x10 + i32.const 0x10000001 + i32.const 0 + call $blit + ) +) diff --git a/test/integer_overflow/blit_2bpp_overflow.wat b/test/integer_overflow/blit_2bpp_overflow.wat new file mode 100644 index 00000000..c453f4d5 --- /dev/null +++ b/test/integer_overflow/blit_2bpp_overflow.wat @@ -0,0 +1,13 @@ +(module + (func $blit (import "env" "blit") (param i32 i32 i32 i32 i32 i32)) + (memory (import "env" "memory") 1 1) + (func (export "update") + i32.const 0 + i32.const 0 + i32.const 0 + i32.const 0x8 + i32.const 0x10000001 + i32.const 1 + call $blit + ) +) diff --git a/test/out_of_bands_memory_access/blit_1bpp.wat b/test/out_of_bands_memory_access/blit_1bpp.wat new file mode 100644 index 00000000..e7910339 --- /dev/null +++ b/test/out_of_bands_memory_access/blit_1bpp.wat @@ -0,0 +1,13 @@ +(module + (func $blit (import "env" "blit") (param i32 i32 i32 i32 i32 i32)) + (memory (import "env" "memory") 1 1) + (func (export "update") + i32.const 65529 + i32.const 0 + i32.const 0 + i32.const 8 + i32.const 8 + i32.const 0 + call $blit + ) +) diff --git a/test/out_of_bands_memory_access/blit_2bpp.wat b/test/out_of_bands_memory_access/blit_2bpp.wat new file mode 100644 index 00000000..c3908822 --- /dev/null +++ b/test/out_of_bands_memory_access/blit_2bpp.wat @@ -0,0 +1,13 @@ +(module + (func $blit (import "env" "blit") (param i32 i32 i32 i32 i32 i32)) + (memory (import "env" "memory") 1 1) + (func (export "update") + i32.const 65521 + i32.const 0 + i32.const 0 + i32.const 8 + i32.const 8 + i32.const 1 + call $blit + ) +) diff --git a/test/out_of_bands_memory_access/tracef_double.wat b/test/out_of_bands_memory_access/tracef_double.wat new file mode 100644 index 00000000..15768f7d --- /dev/null +++ b/test/out_of_bands_memory_access/tracef_double.wat @@ -0,0 +1,10 @@ +(module + (func $tracef (import "env" "tracef") (param i32 i32)) + (memory (import "env" "memory") 1 1) + (func (export "update") + i32.const 50000 + i32.const 65529 + call $tracef + ) + (data (i32.const 50000) "%f\00") +) diff --git a/test/out_of_bands_memory_access/tracef_fmt.wat b/test/out_of_bands_memory_access/tracef_fmt.wat new file mode 100644 index 00000000..a8a81478 --- /dev/null +++ b/test/out_of_bands_memory_access/tracef_fmt.wat @@ -0,0 +1,10 @@ +(module + (func $tracef (import "env" "tracef") (param i32 i32)) + (memory (import "env" "memory") 1 1) + (func (export "update") + i32.const 65533 + i32.const 0 + call $tracef + ) + (data (i32.const 65533) "xxx") +) diff --git a/test/out_of_bands_memory_access/tracef_str.wat b/test/out_of_bands_memory_access/tracef_str.wat new file mode 100644 index 00000000..ba690c05 --- /dev/null +++ b/test/out_of_bands_memory_access/tracef_str.wat @@ -0,0 +1,15 @@ +(module + (func $tracef (import "env" "tracef") (param i32 i32)) + (memory (import "env" "memory") 1 1) + (func (export "update") + i32.const 40000 + i32.const 65533 + i32.store + + i32.const 50000 + i32.const 40000 + call $tracef + ) + (data (i32.const 50000) "%s\00") + (data (i32.const 65533) "xxx") +) diff --git a/test/out_of_bands_memory_access/tracef_strptr.wat b/test/out_of_bands_memory_access/tracef_strptr.wat new file mode 100644 index 00000000..52e9da11 --- /dev/null +++ b/test/out_of_bands_memory_access/tracef_strptr.wat @@ -0,0 +1,10 @@ +(module + (func $tracef (import "env" "tracef") (param i32 i32)) + (memory (import "env" "memory") 1 1) + (func (export "update") + i32.const 50000 + i32.const 65533 + call $tracef + ) + (data (i32.const 50000) "%s\00") +)