[all-commits] [llvm/llvm-project] 7eaf47: [ubsan] Add -fsanitize-merge (and -fno-sanitize-me...

Thurston Dang via All-commits all-commits at lists.llvm.org
Wed Dec 18 15:36:34 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7eaf4708098c216bf432fc7e0bc79c3771e793a4
      https://github.com/llvm/llvm-project/commit/7eaf4708098c216bf432fc7e0bc79c3771e793a4
  Author: Thurston Dang <thurston at google.com>
  Date:   2024-12-18 (Wed, 18 Dec 2024)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.h
    M clang/include/clang/Driver/Options.td
    M clang/include/clang/Driver/SanitizerArgs.h
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/Driver/SanitizerArgs.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/CodeGen/ubsan-trap-merge.c
    M clang/test/Driver/fsanitize.c

  Log Message:
  -----------
  [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (#120464)

'-mllvm -ubsan-unique-traps'
(https://github.com/llvm/llvm-project/pull/65972) applies to all UBSan
checks. This patch introduces -fsanitize-merge (defaults to on,
maintaining the status quo behavior) and -fno-sanitize-merge (equivalent
to '-mllvm -ubsan-unique-traps'), with the option to selectively
applying non-merged handlers to a subset of UBSan checks (e.g.,
-fno-sanitize-merge=bool,enum).

N.B. we do not use "trap" in the argument name since
https://github.com/llvm/llvm-project/pull/119302 has generalized
-ubsan-unique-traps to work for non-trap modes (min-rt and regular rt).

This patch does not remove the -ubsan-unique-traps flag; that will
override -f(no-)sanitize-merge.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list