[llvm-bugs] [Bug 45295] New: Provide a way to declare the *SAN exception handler -fsanitize-undefined-trap-on-error

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 24 11:19:08 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45295

            Bug ID: 45295
           Summary: Provide a way to declare the *SAN exception handler
                    -fsanitize-undefined-trap-on-error
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ubsan
          Assignee: unassignedbugs at nondot.org
          Reporter: keescook at chromium.org
                CC: llvm-bugs at lists.llvm.org

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200324/283bf459/attachment.html>


More information about the llvm-bugs mailing list