public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109489] New: [ubsan] Support -fsanitize-trap=
@ 2023-04-12 18:07 i at maskray dot me
  2023-04-12 18:09 ` [Bug sanitizer/109489] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: i at maskray dot me @ 2023-04-12 18:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109489
           Summary: [ubsan] Support -fsanitize-trap=
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: i at maskray dot me
  Target Milestone: ---

Clang has supported -fsanitize-trap=undefined and many fine-grained options[1]
e.g. -fsanitize-trap=alignment since 2015.

-fsanitize-undefined-trap-on-error is a deprecated alias for
-fsanitize-trap=undefined in Clang. -fsanitize-trap= provides fine-grained
control over putting specific checks into the trap mode, and it provides a
unified interface with -fsanitize= and -fsanitize-recover=.

As an example, -fsanitize=undefined in the normal mode may increase the binary
size a lot.
The user may put some checks into the trap mode while keeping the rest in the
normal mode (-fsanitize-trap=alignment,null) to make the binary smaller.

[1]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html

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

end of thread, other threads:[~2023-04-17  4:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 18:07 [Bug c/109489] New: [ubsan] Support -fsanitize-trap= i at maskray dot me
2023-04-12 18:09 ` [Bug sanitizer/109489] " pinskia at gcc dot gnu.org
2023-04-17  4:22 ` i at maskray dot me
2023-04-17  4:59 ` pinskia at gcc dot gnu.org

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).