[PATCH] D89959: UBSAN: emit distinctive traps in trapping mode

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 09:11:30 PST 2020


vsk accepted this revision.
vsk added subscribers: kcc, eugenis.
vsk added a comment.
This revision is now accepted and ready to land.

Thanks, lgtm with two comments --

> Because of the extra traps there is a small code-size penalty, but it's pretty small compared to what we accept just for the sanitization so probably not a big concern (57.0% overhead as opposed to 55.7% currently on SPEC, for AArch64),

Was this measured with all of -fsanitize=undefined enabled? If so, the actual size overhead is likely lower, as only a subset of these checks get enabled in production settings.



================
Comment at: llvm/docs/LangRef.rst:19494
+
+      declare void @llvm.ubsantrap(i32 immarg) cold noreturn nounwind
+
----------------
tschuett wrote:
> This is still i32.
Yes, please update the langref.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89959/new/

https://reviews.llvm.org/D89959



More information about the llvm-commits mailing list