summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/99_bugs/27_invalid_sparse_array_set
blob: 4c47039ac8077a5ace502c444133aaa09cf2b4a8 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 --