Skip to content

Commit 803bcf8

Browse files
Optional stack smash protection -fstack-protector
Add a menu to enable GCC's built-in stack smash protection. When a subroutine goes past its end of stack, generate a crashdump on function exit like: ```` GCC detected stack overrun Stack corrupted, stack smash detected. >>>stack>>> ctx: cont sp: 3fffff20 end: 3fffffc0 offset: 0000 3fffff20: 40202955 00000001 0000001c 4020287e 3fffff30: feefeffe 000000fd 00000000 00000000 ... <<<stack<<< ```` Disabled by default because there is a small per-function code overhead (and CPU time if the function is called very frequently and is very small). BearSSL and LWIP are not built using stack smash detection, yet.
1 parent c4dea28 commit 803bcf8

File tree

4 files changed

+168
-3
lines changed

4 files changed

+168
-3
lines changed

0 commit comments

Comments
 (0)