6 Commits

Author SHA1 Message Date
Tristan Ross
1d0f40ba05
[libc] fix generic __stack_check_fail for fuchsia (#121401) 2024-12-31 19:36:24 -05:00
Tristan Ross
6f3d1d3018
[libc] add __stack_chk_guard to generic (#121121) 2024-12-31 02:34:16 -05:00
Schrodinger ZHU Yifan
aef9a89c85
[NFC] add newline after stack smashing message (#100958)
<img width="662" alt="smash newline"
src="https://github.com/user-attachments/assets/99625bcb-efd6-4733-aa01-2a2167ee686f">
2024-07-28 19:23:36 -07:00
Nick Desaulniers
8f6352fcb3
[libc] remove unnecessary dependency on assert from __stack_check_fail (#75985) 2023-12-19 15:55:22 -08:00
Nick Desaulniers
24d44ff473
[libc] __stack_chk_fail post submit test failures (#75962)
Use a size smaller than the smallest supported page size so that we
don't
clobber over any guard pages, which may result in a segfault before
__stack_chk_fail can be called.

Also, move __stack_chk_fail outside of our namespace.
2023-12-19 11:59:42 -08:00
Nick Desaulniers
315a5cce89
[libc] move __stack_chk_fail to src/ from startup/ (#75863)
__stack_chk_fail should be provided by libc.a, not startup files.

Add __stack_chk_fail to existing linux and arm entrypoints. On Windows
(when
not targeting MinGW), it seems that the corresponding function
identifier is
__security_check_cookie, so no entrypoint is added for Windows.
Baremetal
targets also ought to be compileable with `-fstack-protector*`

There is no common header for this prototype, since calls to
__stack_chk_fail
are meant to be inserted by the compiler upon function return when
compiled
`-fstack-protector*`.
2023-12-19 11:05:12 -08:00