Indirect Calling of Nested Functions on GCC Without Executable Stack
uecker
72 points
49 comments
August 29, 2026
Related Discussions
Found 5 related stories in 62.5ms across 4,895 title embeddings via pgvector HNSW
- Using GCC's Nested Functions with Wide Pointers and No Trampolines II uecker · 92 pts · August 15, 2026 · 73% similar
- How do functions like alloca allocate memory from the stack? ingve · 48 pts · August 17, 2026 · 54% similar
- How do functions like alloca allocate memory from the stack? ibobev · 12 pts · August 28, 2026 · 54% similar
- Tail-call optimization in C is relatively recent (2025) prakashqwerty · 88 pts · August 10, 2026 · 50% similar
- Zig's Incremental Compilation Internals garyhtou · 218 pts · July 28, 2026 · 48% similar
Discussion Highlights (5 comments)
inigyou
Self-modifying code is cool. It's a shame we had to disable it for security.
mananaysiempre
Related: previous article in the series, https://news.ycombinator.com/item?id=49308685 (103 points, 47 comments)
gue5t
At first, I was annoyed by having to read AT&T syntax. Then I was disoriented by realizing the next snippet was in AT&T syntax without the '%' sigil for registers. But the technique is cool.
Dwedit
What do you need the executable stack for? You call using a function pointer, there's no executable read/write memory involved in using a function pointer.
BobbyTables2
Have always wondered, why can’t nested functions just be normal functions inside a namespace? It seems silly to expose a tiny helper to the entire compilation unit when it is only meant to be used inside one function…