Nice stack smashing postmortem message by mcspr · Pull Request #8670 · esp8266/Arduino

@mcspr

Wire everything that relies on stack smashing detection to call
`__stack_chk_fail()` (aka what libssp / ssp / stack-protector uses)
Expose it in our debugging header

Rename overflow -> smashing, as these are different things we are trying
to detect (meaning, that we check for things writing there, not some
kind of `alloca` issue or the way `-fstack-check` would have worked)
ref. esp8266#8666

`-fstack-protector` continues to work as it always did
CONT replaces `abort()`, also moves its check to the loop wrapper to
avoid dumping otherwise useless SYS context memory
StackThunk replaces a similar `abort()` call

@d-a-v added the alpha

included in alpha release

label

Sep 13, 2022

@d-a-v d-a-v added this to the 3.1 milestone

Sep 13, 2022

@mcspr

@mcspr mcspr deleted the stack-smashing-morty branch

October 31, 2022 04:15

hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request

Nov 18, 2024
Wire everything that relies on stack smashing detection to call
`__stack_chk_fail()` (aka what libssp / ssp / stack-protector uses)
Expose it in our debugging header

Rename overflow -> smashing, as these are different things we are trying
to detect (meaning, that we check for things writing there, not some
kind of `alloca` issue or the way `-fstack-check` would have worked)
ref. esp8266#8666

`-fstack-protector` continues to work as it always did
CONT replaces `abort()`, also moves its check to the loop wrapper to
avoid dumping otherwise useless SYS context memory
StackThunk replaces a similar `abort()` call