[PATCH] D79279: Add overloaded versions of builtin mem* functions

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 5 10:46:32 PDT 2020


vsk added inline comments.


================
Comment at: compiler-rt/lib/ubsan/ubsan_handlers.cpp:659
+                                             uptr PtrOrSize) {
   GET_REPORT_OPTIONS(true);
+  handleInvalidBuiltin(Data, Opts, PtrOrSize);
----------------
It looks like `__ubsan_handle_invalid_builtin` is meant to be recoverable, so I think this should be `GET_REPORT_OPTIONS(false)`. Marking this unrecoverable makes it impossible to suppress redundant diagnostics at the same source location. It looks this isn't code you've added: feel free to punt this to me. If you don't mind folding in a fix, adding a test would be simple (perform UB in a loop and verify only one diagnostic is printed).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79279



More information about the cfe-commits mailing list