[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug middle-end/93509] Stack protector should offer trap-only handling
From: "matheus.a.m.moreira at gmail dot com via Gcc-bugs" <gcc-bugs () gcc ! gnu ! org>
Date: 2024-01-31 22:20:57
Message-ID: bug-93509-4-9AeKBi1T5T () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93509
Matheus Afonso Martins Moreira <matheus.a.m.moreira at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matheus.a.m.moreira at gmail dot c
| |om
--- Comment #2 from Matheus Afonso Martins Moreira <matheus.a.m.moreira at gmail dot com> ---
I also need this feature. I'm writing freestanding Linux applications which are
compiled with -ffreestanding -nostdlib. I would not need to implement
__stack_chk_fail if GCC could be configured to emit traps instead of calling a
function.
The sanitizers already have trapping modes:
-fsanitize-trap[=opts]
The -fsanitize-trap= option instructs the compiler to report for sanitizers
mentioned in comma-separated list of opts undefined behavior using
__builtin_trap rather than a libubsan library routine.
The advantage of this is that the libubsan library is not needed and is not
linked in, so this is usable even in freestanding environments.
This feature would be the stack smashing protector equivalent.=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic