logoalt Hacker News

ueckeryesterday at 1:19 PM1 replyview on HN

Correct (although the nightmare part is a bit exaggerated since return-oriented programming showed that non-executable stack does not help a lot). GCC can also put the trampoline on the heap, but this also has downsides.

For me the main downside of trampolines is that the optimizer can not de-virtualize the trampoline again. This could be implemented, but avoiding the creation of the trampoline in the first place is much better.


Replies

Gibbon1yesterday at 9:14 PM

That's what it felt to me like. With non split stacks you're mixing return addresses with potentially entrusted data. You're already living in sin. With split stacks a trampoline wouldn't be a problem.