3 ms·
Probing more than a page size below the current stack pointer is wrong. Probing more than a page size further when one's saved frame area, save area, locals ar
by JdeBP 9y ago
Probing more than a page size below the current stack pointer is wrong. Probing more than a page size further when one's saved frame area, save area, locals area, and (maximum) calling parameters area do not amount to a page in total is also wrong.
For more on the considerations that underpin stack probing, see http://jdebp.eu./FGA/function-perilogues.html#StackProbes http://jdebp.eu./FGA/function-perilogues.html#StackProbes for starters.
- amluto 9y agoAlso, the probe does an unlocked RMW (or 0) instead of a read, which is slower but also wrong in a multithreaded application. The latter is what broke Go.
- caf 9y agoIs that because Go crams the thread stacks closely together and it probed into another thread's stack? Regardless, it seems like RMW (or even just a store) should be fine as long as the stack pointer is adjusted before the probe.