Commit 4436fb1
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>1 parent ca2f491 commit 4436fb1
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
201 | 212 | | |
202 | 213 | | |
203 | 214 | | |
| |||
211 | 222 | | |
212 | 223 | | |
213 | 224 | | |
| 225 | + | |
214 | 226 | | |
215 | 227 | | |
216 | 228 | | |
| |||
0 commit comments