4 ms·
And, for reasons that are entirely unknown, the issue got worse due to one of the PTI patches (written by, and hence tentatively blamed on, yours truly). Presu
by amluto 9y ago
And, for reasons that are entirely unknown, the issue got worse due to one of the PTI patches (written by, and hence tentatively blamed on, yours truly). Presumably it caused some minor change in code generation causing GCC to go nuts.
FWIW, the compile flag that Gentoo enabled activates a seriously busted GCC feature, and I'm a bit surprised that Gentoo gets away with it in user code.
- djsumdog 9y agoWhich compile flag is that? (I run Gentoo) Edit: nevermind. It's the -fstack-check flag mentioned in the other comments.
- caf 9y agoIs there anywhere to read up on the bustedness of the stack probing feature? (apart from the obvious incompatibility with trying to do that for kernel code).
- JdeBP 9y agoProbing 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.