summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/99_bugs/02_array_pop_use_after_free
blob: 22f63ffce231d0bdf7b9cb2db9cc69a62af2e2bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
When popping an element off an array, especially the last one, the popped
value might have been freed before the refcount was increased later on
function return.

-- Expect stdout --
1
-- End --

-- Testcase --
{%
	x = [1];
	print(pop(x), "\n");	// This caused a SIGABRT before the bugfix
%}
-- End --