3 ms·
Can anyone give a layperson's explanation of what exactly GCC 4.9 is doing wrong here? I'm not fluent in Assembly and/or compiler internals. What's changed from
by quarterto 12y ago
Can anyone give a layperson's explanation of what exactly GCC 4.9 is doing wrong here? I'm not fluent in Assembly and/or compiler internals. What's changed from 4.8?
- kryptiskt 12y agoIt is doing two things wrong, it is moving a constant value to the stack and it's doing it before increasing the stack pointer, so it's momentarily outside the stack area. If an interrupt hits during the instructions the stack is broken, the interrupt service routine will increase the stack for its own use and overwrite that value.
- masklinn 12y agoSee the bug report linked by e40[0] for explanations. Interestingly, the bug actually exists since 4.5.0, it just doesn't trigger because of different optimisations being applied elsewhere. [0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61904 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61904