Home
last modified time | relevance | path

Searched refs:stack (Results 1 – 25 of 167) sorted by relevance

1234567

/PHP-8.3/Zend/
H A Dzend_stack.c23 #define ZEND_STACK_ELEMENT(stack, n) ((void *)((char *) (stack)->elements + (stack)->size * (n))) argument
27 stack->size = size; in zend_stack_init()
28 stack->top = 0; in zend_stack_init()
29 stack->max = 0; in zend_stack_init()
36 if (stack->top >= stack->max) { in zend_stack_push()
38 stack->elements = safe_erealloc(stack->elements, stack->size, stack->max, 0); in zend_stack_push()
40 memcpy(ZEND_STACK_ELEMENT(stack, stack->top), element, stack->size); in zend_stack_push()
48 return ZEND_STACK_ELEMENT(stack, stack->top - 1); in zend_stack_top()
57 --stack->top; in zend_stack_del_top()
95 return stack->top; in zend_stack_count()
[all …]
H A Dzend_ptr_stack.h46 if (stack->top+count > stack->max) { \ in END_EXTERN_C()
50 } while (stack->top+count > stack->max); \ in END_EXTERN_C()
51stack->elements = (void **) safe_perealloc(stack->elements, sizeof(void *), (stack->max), 0, stack in END_EXTERN_C()
52 stack->top_element = stack->elements+stack->top; \ in END_EXTERN_C()
64 *(stack->top_element++) = a;
65 *(stack->top_element++) = b;
89 stack->top -= 3; in zend_ptr_stack_3_pop()
96 stack->top -= 2; in zend_ptr_stack_2_pop()
103 stack->top++; in zend_ptr_stack_push()
109 stack->top--; in zend_ptr_stack_pop()
[all …]
H A Dzend_ptr_stack.c26 stack->top_element = stack->elements = NULL; in zend_ptr_stack_init_ex()
27 stack->top = stack->max = 0; in zend_ptr_stack_init_ex()
47 stack->top++; in zend_ptr_stack_n_push()
64 stack->top--; in zend_ptr_stack_n_pop()
75 pefree(stack->elements, stack->persistent); in zend_ptr_stack_destroy()
82 int i = stack->top; in zend_ptr_stack_apply()
103 int i = stack->top; in zend_ptr_stack_clean()
106 pefree(stack->elements[i], stack->persistent); in zend_ptr_stack_clean()
109 stack->top = 0; in zend_ptr_stack_clean()
110 stack->top_element = stack->elements; in zend_ptr_stack_clean()
[all …]
H A Dzend_call_stack.c146 stack->base = (int8_t*)addr + max_size; in zend_call_stack_get_linux_pthread()
147 stack->max_size = max_size; in zend_call_stack_get_linux_pthread()
231 stack->base = (void*)end; in zend_call_stack_get_linux_proc_maps()
232 stack->max_size = max_size; in zend_call_stack_get_linux_proc_maps()
282 stack->base = (int8_t*)addr + max_size; in zend_call_stack_get_freebsd_pthread()
283 stack->max_size = max_size; in zend_call_stack_get_freebsd_pthread()
323 stack->base = stack_base; in zend_call_stack_get_freebsd_sysctl()
394 stack->base = (void*)high_limit; in zend_call_stack_get_win32()
403 stack->max_size -= page_size; in zend_call_stack_get_win32()
434 stack->base = base; in zend_call_stack_get_macos()
[all …]
H A Dzend_stack.h37 ZEND_API void zend_stack_init(zend_stack *stack, int size);
38 ZEND_API int zend_stack_push(zend_stack *stack, const void *element);
39 ZEND_API void *zend_stack_top(const zend_stack *stack);
40 ZEND_API void zend_stack_del_top(zend_stack *stack);
41 ZEND_API int zend_stack_int_top(const zend_stack *stack);
42 ZEND_API bool zend_stack_is_empty(const zend_stack *stack);
43 ZEND_API void zend_stack_destroy(zend_stack *stack);
44 ZEND_API void *zend_stack_base(const zend_stack *stack);
45 ZEND_API int zend_stack_count(const zend_stack *stack);
46 ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
[all …]
H A Dzend_fibers.c271 stack->ss_size = (stack->ss_size + 7) & ~7; in zend_fiber_stack_allocate()
285 stack->valgrind_stack_id = VALGRIND_STACK_REGISTER(base, base + stack->size); in zend_fiber_stack_allocate()
289 stack->asan_pointer = stack->pointer; in zend_fiber_stack_allocate()
290 stack->asan_size = stack->size; in zend_fiber_stack_allocate()
293 return stack; in zend_fiber_stack_allocate()
319 munmap(stack->ss_base, stack->ss_size); in zend_fiber_stack_free()
322 efree(stack); in zend_fiber_stack_free()
345 return (void*)((uintptr_t)stack->pointer + stack->size); in zend_fiber_stack_base()
429 void *stack = (void *) ((uintptr_t) context->stack->pointer + context->stack->size); in zend_fiber_init_context() local
435 *((unsigned long*) (stack - 8)) = (unsigned long)context->stack->ss_base + context->stack->ss_size; in zend_fiber_init_context()
[all …]
/PHP-8.3/Zend/Optimizer/
H A Dzend_worklist.h44 stack->buf = (int*)zend_arena_calloc(arena, sizeof(*stack->buf), len); in zend_worklist_stack_prepare()
45 stack->len = 0; in zend_worklist_stack_prepare()
46 stack->capacity = len; in zend_worklist_stack_prepare()
51 ZEND_ASSERT(stack->len < stack->capacity); in zend_worklist_stack_push()
52 stack->buf[stack->len++] = i; in zend_worklist_stack_push()
57 ZEND_ASSERT(stack->len); in zend_worklist_stack_peek()
58 return stack->buf[stack->len - 1]; in zend_worklist_stack_peek()
63 ZEND_ASSERT(stack->len); in zend_worklist_stack_pop()
64 return stack->buf[--stack->len]; in zend_worklist_stack_pop()
69 zend_worklist_stack stack; member
[all …]
/PHP-8.3/ext/pcre/pcre2lib/sljit/
H A DsljitUtils.c196 stack->end = stack->min_start + max_size; in sljit_allocate_stack()
197 stack->start = stack->end - start_size; in sljit_allocate_stack()
198 stack->top = stack->end; in sljit_allocate_stack()
199 return stack; in sljit_allocate_stack()
233 munmap((void*)stack->min_start, (size_t)(stack->end - stack->min_start)); in sljit_free_stack()
266 stack->end = stack->min_start + max_size; in sljit_allocate_stack()
267 stack->start = stack->end; in sljit_allocate_stack()
288 stack->end = stack->min_start + max_size; in sljit_allocate_stack()
289 stack->start = stack->end - start_size; in sljit_allocate_stack()
292 stack->top = stack->end; in sljit_allocate_stack()
[all …]
/PHP-8.3/ext/spl/tests/
H A Ddllist_004.phpt5 $stack = new SplStack();
8 $stack->pop();
13 $stack->shift();
20 $stack->push($a);
21 echo $stack->pop()."\n";
24 $stack->push(1);
25 $stack->push(2);
26 echo $stack->top()."\n";
34 $stack->push(NULL);
35 $stack->push(NULL);
[all …]
H A Dbug75673.phpt5 $stack = new SplStack();
6 $stack->push("one");
7 $stack->push("two");
9 $serialized = $stack->serialize();
10 var_dump($stack->count());
11 $stack->unserialize($serialized);
12 var_dump($stack->count());
13 $stack->unserialize($serialized);
14 var_dump($stack->count());
/PHP-8.3/ext/com_dotnet/tests/
H A Dbug73679.phpt13 $stack = new DOTNET("mscorlib", "System.Collections.Stack", -2200000000);
14 $stack->Push(".Net");
15 $stack->Push("Hello ");
16 echo $stack->Pop() . $stack->Pop();
/PHP-8.3/ext/json/tests/
H A Dgh15168.phpt2 GH-15168 (stack overflow in json_encode())
6 die('skip No stack limit support');
9 die('skip ASAN needs different stack limit setting due to more stack space usage');
42 string(28) "Maximum stack depth exceeded"
/PHP-8.3/ext/standard/tests/serialize/
H A Dgh15169.phpt2 GH-15169 (stack overflow when var serialization in ext/standard/var)
6 die('skip No stack limit support');
9 die('skip ASAN needs different stack limit setting due to more stack space usage');
40 Maximum call stack size reached. Infinite recursion?
/PHP-8.3/Zend/tests/stack_limit/
H A Dstack_limit_010.phpt2 Stack limit 010 - Check stack size detection against known defaults
13 $stack = zend_test_zend_call_stack_get();
15 var_dump($stack);
31 printf("Actual max_size: %s\n", $stack['max_size']);
33 var_dump($stack['max_size'] === sprintf('0x%x', $expectedMaxSize));
/PHP-8.3/ext/standard/tests/array/
H A Darray_shift_variation7.phpt11 $stack = array ('one' => 'un', 'two' => 'deux');
14 var_dump($result = array_shift($stack));
17 echo key($stack) . " => " . current ($stack) . "\n";
H A Darray_push_variation5.phpt11 $stack = array ('one' => 'un', 'two' => 'deux');
15 var_dump($result = array_push($stack, $var0));
18 echo key($stack) . " => " . current ($stack) . "\n";
H A Darray_shift_variation5.phpt7 * as the $stack argument of another call to array_shift()
13 $stack = array ( array ( array ('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei');
17 var_dump(array_shift(array_shift(array_shift($stack))));
19 $stack = array (array( array('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei');
22 $result1 = array_shift($stack);
/PHP-8.3/tests/lang/
H A DpassByReference_012.phpt8 $stack = array ( array ( 'two' ));
9 var_dump(array_shift(array_shift($stack)));
13 $stack = $original;
14 var_dump(array_shift(array_shift($stack)));
/PHP-8.3/sapi/phpdbg/
H A Dphpdbg_cmd.c380 if (stack->next) { in phpdbg_stack_free()
432 stack->next = NULL; in phpdbg_stack_free()
449 stack->top = next; in phpdbg_stack_push()
451 stack->next = next; in phpdbg_stack_push()
454 next->top = stack->top; in phpdbg_stack_push()
455 stack->top = next; in phpdbg_stack_push()
458 stack->len++; in phpdbg_stack_push()
467 param->next = stack; in phpdbg_stack_separate()
468 stack->top = param->top; in phpdbg_stack_separate()
474 const phpdbg_param_t *top = (stack != NULL) ? *stack : NULL; in phpdbg_stack_verify()
[all …]
/PHP-8.3/Zend/asm/
H A Djump_i386_ms_pe_masm.asm28 ; prepare stack
45 ; load current deallocation stack
48 ; load current stack limit
51 ; load current stack base
86 ; restore current deallocation stack
89 ; restore current stack limit
92 ; restore current stack base
106 ; prepare stack
H A Djump_ppc32_sysv_elf_gas.S66 stwu %r1, -240(%r1) # allocate stack space, R1 % 16 == 0
184 # adjust stack
201 .section .note.GNU-stack,"",%progbits
H A Dmake_ppc64_sysv_elf_gas.S102 # first arg of make_fcontext() == top address of context-stack
106 # reserve space for context-data on context-stack
156 # save return address on stack, set up stack frame
158 # allocate stack space, R1 % 16 == 0
177 .section .note.GNU-stack,"",%progbits
H A Djump_arm64_aapcs_pe_armasm.asm64 ; prepare stack for GP + FPU
84 ; save current stack base and limit
87 ; save current fiber data and deallocation stack
98 ; restore stack base and limit
101 ; restore fiber data and deallocation stack
128 ; restore stack from GP + FPU
H A Dmake_ppc32_sysv_xcoff_gas.S75 # reserve space for context-data on context-stack
116 # save return address on stack, set up stack frame
118 # allocate stack space, R1 % 16 == 0
/PHP-8.3/Zend/tests/
H A Dbug36214.phpt6 public $stack = array();
9 $this->stack[$name] = $var;return;
13 return $this->stack[$name];

Completed in 60 milliseconds

1234567