[PATCH] D148665: Change -fsanitize=function to place two words before the function entry
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 9 13:12:25 PDT 2023
MaskRay added a comment.
In D148665#4316310 <https://reviews.llvm.org/D148665#4316310>, @peter.smith wrote:
> My apologies for not responding. If I've got this right there are 4 related patches:
> D148573 <https://reviews.llvm.org/D148573> (approved)
> D148785 <https://reviews.llvm.org/D148785> Use type hashes rather than RTTI
> D148827 <https://reviews.llvm.org/D148827> support C
> D148665 <https://reviews.llvm.org/D148665> (this one)
> My initial impressions is that this makes -fsanitize=function look more like -fsanitize=kcfi which makes it accessible from C and available to more targets. Is there anything that we lose in the process of making these changes? For example I would expect RTTI to have more information available than a type hash, although this might not make any functional difference.
>
> I'll try and look over the next few days and leave some comments, apologies a bit busy at work at the moment so I can't promise anything speedy.
Thanks! `-fsanitize=function` will indeed become more like `-fsanitize=kcfi`.
There is a big difference that `-fsanitize=function` instrumented code has a signature check for compatibility with object files not compiled with `-fsanitize=function` (and old implementations of `-fsanitize=function` with a difference location to place the signature).
-fsanitize=kcfi doesn't have the compatibility guarantee.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148665/new/
https://reviews.llvm.org/D148665
More information about the cfe-commits
mailing list