Home
last modified time | relevance | path

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

12345678910>>...62

/openbsd-src/usr.bin/dc/
H A Dstack.c25 static __inline bool stack_empty(const struct stack *);
26 static void stack_grow(struct stack *);
35 stack_init(struct stack *stack) in stack_init() argument
37 stack->size = 0; in stack_init()
38 stack->sp = -1; in stack_init()
39 stack->stack = NULL; in stack_init()
43 stack_empty(const struct stack *stack) in stack_empty() argument
45 bool empty = stack->sp == -1; in stack_empty()
92 stack_size(const struct stack *stack) in stack_size() argument
94 return stack->sp + 1; in stack_size()
[all …]
H A Dextern.h43 void stack_init(struct stack *);
46 void stack_swap(struct stack *);
47 size_t stack_size(const struct stack *);
48 void stack_dup(struct stack *);
49 void stack_pushnumber(struct stack *, struct number *);
50 void stack_pushstring(struct stack *stack, char *);
51 void stack_push(struct stack *, struct value *);
52 void stack_set_tos(struct stack *, struct value *);
53 struct value *stack_tos(const struct stack *);
54 struct value *stack_pop(struct stack *);
[all …]
/openbsd-src/lib/librthread/
H A Drthread_stack.c20 static SLIST_HEAD(, stack) def_stacks = SLIST_HEAD_INITIALIZER(head);
23 struct stack *
26 struct stack *stack; in _rthread_alloc_stack() local
38 stack = SLIST_FIRST(&def_stacks); in _rthread_alloc_stack()
39 if (stack != NULL) { in _rthread_alloc_stack()
42 return (stack); in _rthread_alloc_stack()
48 stack = malloc(sizeof(*stack)); in _rthread_alloc_stack()
49 if (stack == NULL) in _rthread_alloc_stack()
63 stack->base = base = thread->attr.stack_addr; in _rthread_alloc_stack()
64 stack->len = thread->attr.stack_size; in _rthread_alloc_stack()
[all …]
/openbsd-src/gnu/llvm/libcxx/include/
H A Dstack14 stack synopsis
20 class stack
33 stack() = default;
34 ~stack() = default;
36 stack(const stack& q) = default;
37 stack(stack&& q) = default;
39 stack& operator=(const stack& q) = default;
40 stack& operator=(stack&& q) = default;
42 explicit stack(const container_type& c);
43 explicit stack(container_type&& c);
[all …]
/openbsd-src/usr.sbin/unbound/services/
H A Dmodstack.c2 * services/modstack.c - stack of modules
39 * This file contains functions to help maintain a stack of modules.
92 modstack_init(struct module_stack* stack) in modstack_init() argument
94 stack->num = 0; in modstack_init()
95 stack->mod = NULL; in modstack_init()
99 modstack_free(struct module_stack* stack) in modstack_config() argument
101 if(!stack) in modstack_config()
103 stack->num = 0; in modstack_config()
104 free(stack->mod); in modstack_config()
105 stack in modstack_config()
226 modstack_setup(struct module_stack * stack,const char * module_conf,struct module_env * env) modstack_setup() argument
251 modstack_desetup(struct module_stack * stack,struct module_env * env) modstack_desetup() argument
264 modstack_find(struct module_stack * stack,const char * name) modstack_find() argument
[all...]
/openbsd-src/sbin/unwind/libunbound/services/
H A Dmodstack.c2 * services/modstack.c - stack of modules
39 * This file contains functions to help maintain a stack of modules.
92 modstack_init(struct module_stack* stack) in modstack_init() argument
94 stack->num = 0; in modstack_init()
95 stack->mod = NULL; in modstack_init()
99 modstack_free(struct module_stack* stack) in modstack_config() argument
101 if(!stack) in modstack_config()
103 stack->num = 0; in modstack_config()
104 free(stack->mod); in modstack_config()
105 stack in modstack_config()
226 modstack_setup(struct module_stack * stack,const char * module_conf,struct module_env * env) modstack_setup() argument
251 modstack_desetup(struct module_stack * stack,struct module_env * env) modstack_desetup() argument
264 modstack_find(struct module_stack * stack,const char * name) modstack_find() argument
[all...]
/openbsd-src/gnu/llvm/lldb/source/Expression/
H A DDWARFExpression.cpp534 static bool Evaluate_DW_OP_entry_value(std::vector<Value> &stack, in Evaluate_DW_OP_entry_value() argument
740 stack.push_back(result); in Evaluate_DW_OP_entry_value()
869 std::vector<Value> stack; in Evaluate() local
884 stack.push_back(*initial_value_ptr); in Evaluate()
916 size_t count = stack.size(); in Evaluate()
922 stack[i].Dump(&new_value); in Evaluate()
933 stack.push_back(Scalar(opcodes.GetAddress(&offset))); in Evaluate()
938 stack.back().SetValueType(Value::ValueType::LoadAddress); in Evaluate()
940 stack.back().SetValueType(Value::ValueType::FileAddress); in Evaluate()
988 if (stack.empty()) { in Evaluate()
[all …]
/openbsd-src/gnu/usr.bin/perl/cpan/Test-Simple/t/Test2/modules/API/
H A DStack.t8 ok(my $stack = Test2::API::Stack->new, "Create a stack");
10 ok(!@$stack, "Empty stack");
11 ok(!$stack->peek, "Nothing to peek at");
13 ok(!exception { $stack->cull }, "cull lives when stack is empty");
14 ok(!exception { $stack->all }, "all lives when stack is empty");
15 ok(!exception { $stack->clear }, "clear lives when stack is empty");
18 exception { $stack->pop(Test2::Hub->new) },
19 qr/No hubs on the stack/,
24 ok($stack->push($hub), "pushed a hub");
27 exception { $stack->pop($hub) },
[all …]
/openbsd-src/gnu/llvm/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_allocator_report.cpp26 stack(stack_) { in ScopedAllocatorErrorReport()
31 stack->Print(); in ~ScopedAllocatorErrorReport()
33 ReportErrorSummary(error_summary, stack); in ~ScopedAllocatorErrorReport()
39 const StackTrace* const stack; member in __sanitizer::ScopedAllocatorErrorReport
44 const StackTrace *stack) { in ReportCallocOverflow() argument
46 ScopedAllocatorErrorReport report("calloc-overflow", stack); in ReportCallocOverflow()
55 const StackTrace *stack) { in ReportReallocArrayOverflow() argument
57 ScopedAllocatorErrorReport report("reallocarray-overflow", stack); in ReportReallocArrayOverflow()
66 void NORETURN ReportPvallocOverflow(uptr size, const StackTrace *stack) { in ReportPvallocOverflow() argument
68 ScopedAllocatorErrorReport report("pvalloc-overflow", stack); in ReportPvallocOverflow()
[all …]
/openbsd-src/gnu/lib/libstdc++/libstdc++/include/bits/
H A Dstl_stack.h71 class stack; variable
74 inline bool operator==(const stack<_Tp,_Seq>& __x,
75 const stack<_Tp,_Seq>& __y);
78 inline bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
106 class stack
115 friend bool operator== (const stack<_Tp1, _Seq1>&,
116 const stack<_Tp1, _Seq1>&);
118 friend bool operator< (const stack<_Tp1, _Seq1>&,
119 const stack<_Tp1, _Seq1>&);
138 stack(const _Sequence& __c = _Sequence())
[all …]
/openbsd-src/gnu/llvm/compiler-rt/lib/msan/
H A Dmsan_allocator.cpp152 static void *MsanAllocate(StackTrace *stack, uptr size, uptr alignment, in MsanAllocate() argument
159 ReportAllocationSizeTooBig(size, max_malloc_size, stack); in MsanAllocate()
164 ReportRssLimitExceeded(stack); in MsanAllocate()
180 ReportOutOfMemory(size, stack); in MsanAllocate()
190 stack->tag = StackTrace::TAG_ALLOC; in MsanAllocate()
191 Origin o = Origin::CreateHeapOrigin(stack); in MsanAllocate()
200 void MsanDeallocate(StackTrace *stack, void *p) { in MsanDeallocate() argument
213 stack->tag = StackTrace::TAG_DEALLOC; in MsanDeallocate()
214 Origin o = Origin::CreateHeapOrigin(stack); in MsanDeallocate()
229 static void *MsanReallocate(StackTrace *stack, void *old_p, uptr new_size, in MsanReallocate() argument
[all …]
/openbsd-src/usr.sbin/bgpctl/
H A Djson.c43 } stack[JSON_MAX_STACK]; variable
55 if (stack[level].compact) in do_comma_indent()
58 if (stack[level].count++ > 0) { in do_comma_indent()
63 if (stack[level].compact) in do_comma_indent()
72 if (stack[level].type == ARRAY) in do_name()
84 if (type == stack[i].type && in do_find()
85 strcmp(name, stack[i].name) == 0) in do_find()
96 memset(stack, 0, sizeof(stack)); in json_do_start()
98 stack[level].type = START; in json_do_start()
129 if (stack[level].type == ARRAY) in json_do_array()
[all …]
/openbsd-src/usr.sbin/rpki-client/
H A Djson.c43 } stack[JSON_MAX_STACK]; variable
55 if (stack[level].compact) in do_comma_indent()
58 if (stack[level].count++ > 0) { in do_comma_indent()
63 if (stack[level].compact) in do_comma_indent()
72 if (stack[level].type == ARRAY) in do_name()
84 if (type == stack[i].type && in do_find()
85 strcmp(name, stack[i].name) == 0) in do_find()
96 memset(stack, 0, sizeof(stack)); in json_do_start()
98 stack[level].type = START; in json_do_start()
129 if (stack[level].type == ARRAY) in json_do_array()
[all …]
/openbsd-src/usr.sbin/radiusctl/
H A Djson.c43 } stack[JSON_MAX_STACK]; variable
55 if (stack[level].compact) in do_comma_indent()
58 if (stack[level].count++ > 0) { in do_comma_indent()
63 if (stack[level].compact) in do_comma_indent()
72 if (stack[level].type == ARRAY) in do_name()
84 if (type == stack[i].type && in do_find()
85 strcmp(name, stack[i].name) == 0) in do_find()
96 memset(stack, 0, sizeof(stack)); in json_do_start()
98 stack[level].type = START; in json_do_start()
129 if (stack[level].type == ARRAY) in json_do_array()
[all …]
/openbsd-src/gnu/llvm/compiler-rt/lib/lsan/
H A Dlsan_allocator.cpp60 static void RegisterAllocation(const StackTrace &stack, void *p, uptr size) { in RegisterAllocation() argument
65 m->stack_trace_id = StackDepotPut(stack); in RegisterAllocation()
77 static void *ReportAllocationSizeTooBig(uptr size, const StackTrace &stack) { in ReportAllocationSizeTooBig() argument
82 ReportAllocationSizeTooBig(size, max_malloc_size, &stack); in ReportAllocationSizeTooBig()
85 void *Allocate(const StackTrace &stack, uptr size, uptr alignment, in Allocate() argument
90 return ReportAllocationSizeTooBig(size, stack); in Allocate()
94 ReportRssLimitExceeded(&stack); in Allocate()
101 ReportOutOfMemory(size, &stack); in Allocate()
106 RegisterAllocation(stack, p, size); in Allocate()
111 static void *Calloc(uptr nmemb, uptr size, const StackTrace &stack) { in Calloc() argument
[all …]
/openbsd-src/gnu/llvm/compiler-rt/lib/asan/
H A Dasan_allocator.cpp55 u32 tid, u32 stack) { in AtomicContextStore() argument
58 context += stack; in AtomicContextStore()
63 u32 &tid, u32 &stack) { in AtomicContextLoad() argument
65 stack = context; in AtomicContextLoad()
119 void SetAllocContext(u32 tid, u32 stack) { in SetAllocContext() argument
120 AtomicContextStore(&alloc_context_id, tid, stack); in SetAllocContext()
123 void GetAllocContext(u32 &tid, u32 &stack) const { in GetAllocContext()
124 AtomicContextLoad(&alloc_context_id, tid, stack); in GetAllocContext()
132 void SetFreeContext(u32 tid, u32 stack) { in SetFreeContext() argument
133 AtomicContextStore(&free_context_id, tid, stack); in SetFreeContext()
[all …]
H A Dasan_report.h60 void ReportMallocUsableSizeNotOwned(uptr addr, BufferedStackTrace *stack);
62 BufferedStackTrace *stack);
63 void ReportCallocOverflow(uptr count, uptr size, BufferedStackTrace *stack);
65 BufferedStackTrace *stack);
66 void ReportPvallocOverflow(uptr size, BufferedStackTrace *stack);
68 BufferedStackTrace *stack);
70 BufferedStackTrace *stack);
72 BufferedStackTrace *stack);
74 BufferedStackTrace *stack);
75 void ReportRssLimitExceeded(BufferedStackTrace *stack);
[all …]
H A Dasan_errors.h72 ErrorDoubleFree(u32 tid, BufferedStackTrace *stack, uptr addr) in ErrorDoubleFree()
74 second_free_stack(stack) { in ErrorDoubleFree()
88 ErrorNewDeleteTypeMismatch(u32 tid, BufferedStackTrace *stack, uptr addr, in ErrorNewDeleteTypeMismatch()
91 free_stack(stack), in ErrorNewDeleteTypeMismatch()
104 ErrorFreeNotMalloced(u32 tid, BufferedStackTrace *stack, uptr addr) in ErrorFreeNotMalloced()
106 free_stack(stack), in ErrorFreeNotMalloced()
117 ErrorAllocTypeMismatch(u32 tid, BufferedStackTrace *stack, uptr addr, in ErrorAllocTypeMismatch()
120 dealloc_stack(stack), in ErrorAllocTypeMismatch()
128 const BufferedStackTrace *stack; member
134 stack(stack_), in ErrorMallocUsableSizeNotOwned()
[all …]
H A Dasan_errors.cpp25 BufferedStackTrace *stack) { in OnStackUnwind() argument
38 stack->Unwind(StackTrace::GetNextInstructionPc(sig.pc), sig.bp, sig.context, in OnStackUnwind()
56 stack.Print(); in Print()
58 ReportErrorSummary(scariness.GetDescription(), &stack); in Print()
93 stack.Print(); in Print()
95 ReportErrorSummary(scariness.GetDescription(), &stack); in Print()
112 stack.Print(); in Print()
114 ReportErrorSummary(scariness.GetDescription(), &stack); in Print()
132 stack.Print(); in Print()
134 ReportErrorSummary(scariness.GetDescription(), &stack); in Print()
[all …]
/openbsd-src/gnu/gcc/libstdc++-v3/include/bits/
H A Dstl_stack.h98 class stack in _GLIBCXX_BEGIN_NAMESPACE()
108 operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); in _GLIBCXX_BEGIN_NAMESPACE()
112 operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); in _GLIBCXX_BEGIN_NAMESPACE()
131 stack(const _Sequence& __c = _Sequence()) in _GLIBCXX_BEGIN_NAMESPACE()
214 operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
232 operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
238 operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
244 operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
250 operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
256 operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
/openbsd-src/lib/libcbor/src/cbor/internal/
H A Dbuilder_callbacks.c26 if (ctx->stack->size == 0) { in _cbor_builder_append()
32 switch (ctx->stack->top->item->type) { in _cbor_builder_append()
37 if (cbor_array_is_definite(ctx->stack->top->item)) { in _cbor_builder_append()
41 CBOR_ASSERT(ctx->stack->top->subitems > 0); in _cbor_builder_append()
44 if (!cbor_array_push(ctx->stack->top->item, item)) { in _cbor_builder_append()
50 ctx->stack->top->subitems--; in _cbor_builder_append()
51 if (ctx->stack->top->subitems == 0) { in _cbor_builder_append()
52 cbor_item_t *stack_item = ctx->stack->top->item; in _cbor_builder_append()
53 _cbor_stack_pop(ctx->stack); in _cbor_builder_append()
58 if (!cbor_array_push(ctx->stack->top->item, item)) { in _cbor_builder_append()
[all …]
H A Dstack.c14 void _cbor_stack_pop(struct _cbor_stack *stack) { in _cbor_stack_pop() argument
15 struct _cbor_stack_record *top = stack->top; in _cbor_stack_pop()
16 stack->top = stack->top->lower; in _cbor_stack_pop()
18 stack->size--; in _cbor_stack_pop()
21 struct _cbor_stack_record *_cbor_stack_push(struct _cbor_stack *stack, in _cbor_stack_push() argument
24 if (stack->size == CBOR_MAX_STACK_SIZE) return NULL; in _cbor_stack_push()
29 *new_top = (struct _cbor_stack_record){stack->top, item, subitems}; in _cbor_stack_push()
30 stack->top = new_top; in _cbor_stack_push()
31 stack->size++; in _cbor_stack_push()
/openbsd-src/gnu/llvm/compiler-rt/lib/hwasan/
H A Dhwasan_allocator.cpp78 inline void Metadata::SetAllocated(u32 stack, u64 size) { in SetAllocated() argument
82 context += stack; in SetAllocated()
163 static void *HwasanAllocate(StackTrace *stack, uptr orig_size, uptr alignment, in HwasanAllocate() argument
171 ReportAllocationSizeTooBig(orig_size, kMaxAllowedMallocSize, stack); in HwasanAllocate()
176 ReportRssLimitExceeded(stack); in HwasanAllocate()
194 ReportOutOfMemory(size, stack); in HwasanAllocate()
217 if (flags()->tag_in_malloc && malloc_bisect(stack, orig_size)) { in HwasanAllocate()
241 meta->SetAllocated(StackDepotPut(*stack), orig_size); in HwasanAllocate()
256 static bool CheckInvalidFree(StackTrace *stack, void *untagged_ptr, in CheckInvalidFree() argument
261 ReportInvalidFree(stack, reinterpret_cast<uptr>(tagged_ptr)); in CheckInvalidFree()
[all …]
/openbsd-src/gnu/llvm/clang/docs/
H A DSafeStack.rst12 based on stack buffer overflows, without introducing any measurable performance
13 overhead. It works by separating the program stack into two distinct regions:
14 the safe stack and the unsafe stack. The safe stack stores return addresses,
16 while the unsafe stack stores everything else. This separation ensures that
17 buffer overflows on the unsafe stack cannot be used to overwrite anything
18 on the safe stack.
30 stack and, hence, do not need unsafe stack frames to be created. The cost of
31 creating unsafe stack frames for large functions is amortized by the cost of
35 being moved to the unsafe stack are usually large arrays or variables that are
36 used through multiple stack frames. Moving such objects away from the safe
[all …]
/openbsd-src/gnu/llvm/compiler-rt/lib/memprof/
H A Dmemprof_allocator.cpp338 void *Allocate(uptr size, uptr alignment, BufferedStackTrace *stack, in Allocate()
345 ReportRssLimitExceeded(stack); in Allocate()
347 CHECK(stack); in Allocate()
374 ReportAllocationSizeTooBig(size, malloc_limit, stack); in Allocate()
391 ReportOutOfMemory(size, stack); in Allocate()
409 m->alloc_context_id = StackDepotPut(*stack); in Allocate()
436 BufferedStackTrace *stack, AllocType alloc_type) { in Deallocate()
481 void *Reallocate(void *old_ptr, uptr new_size, BufferedStackTrace *stack) { in Reallocate()
491 void *new_ptr = Allocate(new_size, 8, stack, FROM_MALLOC); in Reallocate()
496 Deallocate(old_ptr, 0, 0, stack, FROM_MALLOC); in Reallocate()
[all …]

12345678910>>...62