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

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 5 14:37:16 PDT 2020


jfb added inline comments.


================
Comment at: compiler-rt/lib/ubsan/ubsan_handlers.cpp:659
+                                             uptr PtrOrSize) {
   GET_REPORT_OPTIONS(true);
+  handleInvalidBuiltin(Data, Opts, PtrOrSize);
----------------
vsk wrote:
> 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).
I folded this into the patch.


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