public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/94307] New: Provide a way to declare the *SAN exception handler -fsanitize-undefined-trap-on-error
@ 2020-03-24 18:17 kees at outflux dot net
  2020-03-25  7:35 ` [Bug sanitizer/94307] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: kees at outflux dot net @ 2020-03-24 18:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94307
           Summary: Provide a way to declare the *SAN exception handler
                    -fsanitize-undefined-trap-on-error
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kees at outflux dot net
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Instead of unconditionally calling __builtin_trap() for
-fsanitize-undefined-trap-on-error it would help the Linux kernel's use of
UBSAN to have a way to specify the trap function. With that, Linux can use its
own internal exception handling routines and avoid various confused states:

https://lore.kernel.org/linux-next/20200324164433.qusyu5h7ykx3f2bu@treble/

For example something like -fsanitize-undefined-trap-function=__ubsan_trap and
"__ubsan_trap" can then be defined by the kernel itself. Using the standard
handler routines (__ubsan_handle_*) are too heavy duty for some builds, so a
regular trap is needed for the kernel, but this allows us to provide a
"continue anyway" option as well.

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

end of thread, other threads:[~2021-07-28  7:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 18:17 [Bug sanitizer/94307] New: Provide a way to declare the *SAN exception handler -fsanitize-undefined-trap-on-error kees at outflux dot net
2020-03-25  7:35 ` [Bug sanitizer/94307] " rguenth at gcc dot gnu.org
2020-03-25  9:28 ` marxin at gcc dot gnu.org
2020-03-25  9:28 ` marxin at gcc dot gnu.org
2020-03-25  9:37 ` jakub at gcc dot gnu.org
2020-03-31  5:02 ` kees at outflux dot net
2020-03-31  7:45 ` marxin at gcc dot gnu.org
2020-04-06 11:23 ` marxin at gcc dot gnu.org
2020-04-20  9:31 ` marxin at gcc dot gnu.org
2020-05-15 11:32 ` marxin at gcc dot gnu.org
2020-07-28 10:24 ` marxin at gcc dot gnu.org
2021-04-27 11:38 ` jakub at gcc dot gnu.org
2021-07-28  7:04 ` rguenth 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).