[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 12:52:41 PDT 2019


vsk added a comment.

> In D67122#1659721 <https://reviews.llvm.org/D67122#1659721>, @vsk wrote:
> 
>> Still think this looks good. Have you tried running this on the llvm test suite, or some other interesting corpus? Would be curious to see any pre/post patch numbers.
> 
> 
> There were 1.5 occurrences in test-suite.
> 
> I'd prefer not to try running it over llvm stage-2/3 (i can, but it's gonna be slow..)
> 
> Though i guess you were talking about *performance* numbers?

Yes, I'm primarily interested in run-time and compile-time performance (at {-O0 -g, -Os -g}). The number of occurrences of new diagnostics is also interesting. What does the .5 mean?

> I'm not good with using test-suite for perf, so i'm yet again going to use my own bench.
>  F9934220: rawspeed-pointer-overflow-0-baseline.json <https://reviews.llvm.org/F9934220> F9934221: rawspeed-pointer-overflow-1-old.json <https://reviews.llvm.org/F9934221> F9934222: rawspeed-pointer-overflow-2-new.json <https://reviews.llvm.org/F9934222>

I see, I'll make some time to collect & share stats from it soon. On that note, I've never had any problems with running the suite in the past, and the results have been very helpful (if nothing else, it's nice to have a mid-size test corpus everyone can share). What sorts of issues are you running into? Were you able to get interesting results with -DTEST_SUITE_RUN_BENCHMARKS=0 set?

> TLDR: (all measurements done with llvm ToT, the sanitizer never fired.)
> 
> - no sanitization vs. existing check: average `+20.75%` slowdown
> - existing check vs. check after this patch: average `+26.36%` slowdown
> - no sanitization vs. this patch: average `+52.58%` slowdown
> 
>   I suspect some of this might be recoverable, but i don't know yet.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67122





More information about the cfe-commits mailing list