Conversation

With 64 bit address spaces, thread stacks should have GBs reserved by default, and programming with alloca should be encouraged. A lot of string and container work could be done at high performance with alloca and no frees if you don't let them escape.
30
545
Replying to
Gotta love the man page. Don't get carried away. "The alloca() function returns a pointer to the beginning of the allocated space. If the allocation causes stack overflow, program behavior is undefined"
2
5
GCC -fstack-check doesn't provide protection in the general case and is actively dangerous on architectures without new-style checking. Clang doesn't actually implement it. -fstack-clash-protection is safe and provides full protection on architectures with proper support for it.
2
1
Show replies