diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-01-23 22:21:24 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-01-26 10:47:56 +0100 |
commit | 04fa2baba6d615c49cf3f77986595da2a7783899 (patch) | |
tree | a346cc4d4fd630797dcc91aeb35f2d7bdf44233b /tests/custom/04_bugs/27_invalid_sparse_array_set | |
parent | abe38e7e390cc17e6eae0ebe94d2006c548e095c (diff) |
tests: reorganize testcase files
- Rename 03_bugs to 04_bugs
- Rename 26_invalid_sparse_array_set to 27_invalid_sparse_array_set
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom/04_bugs/27_invalid_sparse_array_set')
-rw-r--r-- | tests/custom/04_bugs/27_invalid_sparse_array_set | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/custom/04_bugs/27_invalid_sparse_array_set b/tests/custom/04_bugs/27_invalid_sparse_array_set new file mode 100644 index 0000000..4c47039 --- /dev/null +++ b/tests/custom/04_bugs/27_invalid_sparse_array_set @@ -0,0 +1,49 @@ +When setting an array index which is beyond the end of the last currently +preallocated chunk and not evenly divisible by the chunk size, the array +entries list was not properly reallocated resulting in invalid memory +writes. + +-- Testcase -- +{% + for (i = 0; i < 32; i++) { + a = []; + a[i] = true; + print(length(a), "\n"); + } +%} +-- End -- + +-- Expect stdout -- +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +-- End -- |