subsys/logging: Add compiler barriers to msg stack allocation
This ensures that the compiler will have moved the stack pointer below the
stack area where the message will be constructed. Otherwise, the message
can be smashed by an interrupt handler while it is being built.
This bug was found on qemu_cortex_a53 using SDK 0.14.2 with gcc 10.3.0 when
building the samples/subsys/logging/syst/sample.logger.syst.deferred test
under twister using picolibc:
Signed-off-by:
Keith Packard <keithp@keithp.com>
Loading
Please sign in to comment