public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/93509] Stack protector should offer trap-only handling
       [not found] <bug-93509-4@http.gcc.gnu.org/bugzilla/>
@ 2024-01-31 22:20 ` matheus.a.m.moreira at gmail dot com
  2024-02-01  3:58 ` matheus.a.m.moreira at gmail dot com
  1 sibling, 0 replies; 2+ messages in thread
From: matheus.a.m.moreira at gmail dot com @ 2024-01-31 22:20 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug middle-end/93509] Stack protector should offer trap-only handling
       [not found] <bug-93509-4@http.gcc.gnu.org/bugzilla/>
  2024-01-31 22:20 ` [Bug middle-end/93509] Stack protector should offer trap-only handling matheus.a.m.moreira at gmail dot com
@ 2024-02-01  3:58 ` matheus.a.m.moreira at gmail dot com
  1 sibling, 0 replies; 2+ messages in thread
From: matheus.a.m.moreira at gmail dot com @ 2024-02-01  3:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93509

--- Comment #3 from Matheus Afonso Martins Moreira <matheus.a.m.moreira at gmail dot com> ---
Equivalent feature request in the LLVM issue tracker:

https://github.com/llvm/llvm-project/issues/80236

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-01  3:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-93509-4@http.gcc.gnu.org/bugzilla/>
2024-01-31 22:20 ` [Bug middle-end/93509] Stack protector should offer trap-only handling matheus.a.m.moreira at gmail dot com
2024-02-01  3:58 ` matheus.a.m.moreira at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).