[Driver] Make -fsanitize=kcfi,function incompatible
authorFangrui Song <i@maskray.me>
Wed, 19 Apr 2023 20:15:33 +0000 (13:15 -0700)
committerFangrui Song <i@maskray.me>
Wed, 19 Apr 2023 20:15:33 +0000 (13:15 -0700)
commitadbdef6a9f39058f390ba285624b0dfb24bad7e8
tree8da65e8f50ff95bceb3347d572f452fe7ef33322
parente67493f57262862ae2bd4fc5d1d1f552676d815f
[Driver] Make -fsanitize=kcfi,function incompatible

A -fsanitize=kcfi instrumented function has a special instruction/data
before the function entry at a fixed offset.
A -fsanitize=function instrumented function has special instruction/data
after the function entry at a fixed offset (may change to *before* in D148665).

The two instrumentations are not intended to be used together and will become
incompatible after D148665.

Reviewed By: samitolvanen

Differential Revision: https://reviews.llvm.org/D148671
clang/lib/Driver/SanitizerArgs.cpp
clang/test/Driver/fsanitize.c