Re:Viable ROP-free roadmap for i386/armv8/riscv64/alpha/sparc64
by circuit10 on Tuesday September 26, 2023 @12:23PM
(#37661644)
It does make implementing a custom garbage collector harder though, maybe they could have come up with a compromise where there’s a way to walk over local variables on the stack but instead they’re building GC into the runtime, which is also a good solution but having both options might have been nice because a custom one can be more flexible and supported by runtimes that don’t have GC
[ Parent
| on HN ]
Re:Viable ROP-free roadmap for i386/armv8/riscv64/alpha/sparc64
by titzer on Tuesday September 26, 2023 @01:01PM
(#37662334)
We've discussed engine support for stack walking for application-level GC within linear memory, but there hasn't been a clear win (at least in my mind) over just using a shadow stack, which doesn't require walking frames, just scanning a memory segment. Opening up the contents of executing stack frames imposes a ton of constraints on the engine and complexity (e.g. engine now has to maintain mappings, support frame modification, etc), that have implications for basically all execution tiers. It doesn't seem like the right tradeoff to me.
I've implemented a shadow stack for Virgil, so I am aware of how much it sucks. But that doesn't suck as bad as coming up with a stack walking protocol and then modifying every Wasm engine in existence to support that.