Lines Matching refs:stack
159 void* stack = mmap(NULL, stack_size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
160 ASSERT_NE(MAP_FAILED, stack);
161 memset(stack, 0xff, stack_size);
165 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack, stack_size));
174 ASSERT_EQ(0, munmap(stack, stack_size));
535 // If the joiner unmapped the thread's stack, that could lead to SIGSEGV in the thread.
538 void* stack = mmap(NULL, stack_size, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);
542 pthread_attr_setstack(&a, stack, stack_size);
547 ASSERT_EQ(0, munmap(stack, stack_size));
611 // Get the default stack size.
1248 // Get the stack base and the stack size (both ways).
1255 // The two methods of asking for the stack size should agree.
1259 // What does /proc/self/maps' [stack] line say?
1264 if (map.pathname == "[stack]") {
1270 // The high address of the /proc/self/maps [stack] region should equal stack_base + stack_size.
1271 // Remember that the stack grows down (and is mapped in on demand), so the low address of the
1275 // The stack size should correspond to RLIMIT_STACK.
1290 // What if RLIMIT_STACK is smaller than the stack's current extent?
1292 rl.rlim_cur = rl.rlim_max = 1024; // 1KiB. We know the stack must be at least a page already.
1343 // The previous code obtained the main thread's stack by reading the entry in
1344 // /proc/self/task/<pid>/maps that was labeled [stack]. Unfortunately, on x86/x86_64, the kernel
1345 // relies on sp0 in task state segment(tss) to label the stack map with [stack]. If the kernel
1346 // switches a process while the main thread is in an alternate stack, then the kernel will label
1347 // the wrong map with [stack]. This test verifies that when the above situation happens, the main
1348 // thread's stack is found correctly.
1375 // Verify if the stack used by the signal handler is the alternate stack just registered.
1380 // Verify if the main thread's stack got in the signal handler is correct.
1401 // Check whether something on stack is in the range of
1466 // Exit while the other count is still on the cleanup stack.
1792 // Check if we have enough stack space for unwinding.
1796 // Check if we have enough stack space for logging.