Skip to content
Snippets Groups Projects
  • Peter Collingbourne's avatar
    e530af8e
    Introduce -fsanitize-trap= flag. · e530af8e
    Peter Collingbourne authored
    This flag controls whether a given sanitizer traps upon detecting
    an error. It currently only supports UBSan. The existing flag
    -fsanitize-undefined-trap-on-error has been made an alias of
    -fsanitize-trap=undefined.
    
    This change also cleans up some awkward behavior around the combination
    of -fsanitize-trap=undefined and -fsanitize=undefined. Previously we
    would reject command lines containing the combination of these two flags,
    as -fsanitize=vptr is not compatible with trapping. This required the
    creation of -fsanitize=undefined-trap, which excluded -fsanitize=vptr
    (and -fsanitize=function, but this seems like an oversight).
    
    Now, -fsanitize=undefined is an alias for -fsanitize=undefined-trap,
    and if -fsanitize-trap=undefined is specified, we treat -fsanitize=vptr
    as an "unsupported" flag, which means that we error out if the flag is
    specified explicitly, but implicitly disable it if the flag was implied
    by -fsanitize=undefined.
    
    Differential Revision: http://reviews.llvm.org/D10464
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240105 91177308-0d34-0410-b5e6-96231b3b80d8
    e530af8e
    History
    Introduce -fsanitize-trap= flag.
    Peter Collingbourne authored
    This flag controls whether a given sanitizer traps upon detecting
    an error. It currently only supports UBSan. The existing flag
    -fsanitize-undefined-trap-on-error has been made an alias of
    -fsanitize-trap=undefined.
    
    This change also cleans up some awkward behavior around the combination
    of -fsanitize-trap=undefined and -fsanitize=undefined. Previously we
    would reject command lines containing the combination of these two flags,
    as -fsanitize=vptr is not compatible with trapping. This required the
    creation of -fsanitize=undefined-trap, which excluded -fsanitize=vptr
    (and -fsanitize=function, but this seems like an oversight).
    
    Now, -fsanitize=undefined is an alias for -fsanitize=undefined-trap,
    and if -fsanitize-trap=undefined is specified, we treat -fsanitize=vptr
    as an "unsupported" flag, which means that we error out if the flag is
    specified explicitly, but implicitly disable it if the flag was implied
    by -fsanitize=undefined.
    
    Differential Revision: http://reviews.llvm.org/D10464
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240105 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.