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

            Bug ID: 32162
           Summary: Add UB sanitizer for __builtin_assume a la
                    -fsanitize=unreachable
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangb...@nondot.org
          Reporter: jaco...@google.com
                CC: llvm-bugs@lists.llvm.org

-fsanitize=unreachable allows discovering programmer mistakes in constructs
like the following:

    if (!expr) {
      __builtin_unreachable();
    }

As far as I'm aware, it *doesn't* cover the following construct, which is
functionally equivalent but which I'm told may perform better in optimized
builds:

    __builtin_assume(expr);

Should there be a sanitizer that covers this?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to