[cfe-dev] [ubsan] Add -fsanitize-warn-once, only emit runtime error once per check

Will Dietz willdtz at gmail.com
Thu Dec 13 09:56:14 PST 2012


Whoops, missed the ubsan commit yesterday so those don't apply cleanly.

Updated patches attached!

On Thu, Dec 13, 2012 at 11:33 AM, Will Dietz <willdtz at gmail.com> wrote:
> This flag causes clang to emit a byte for each check that is used by the
> runtime to track whether we've already printed an error for that check.
>
>  Often failed checks are triggered many times dynamically, but a user
>  is only interested in which checks failed (with example dynamic values
>  to aid in debugging).  This flag lets the user make such runs much
>  more efficient and generate more manageable output.
> ----------------
>
> Requires corresponding patch to compiler-rt, both are attached.
> Staging as cc1 option, since for now recovery is a cc1 flag as well.
> If this goes in, would like to promote it along the recovery to driver
> flags.
>
> Anyway, I was concerned this would cause problems performance-wise
> (another argument, another register), but impact on SPEC CINT2006 is a
> tad noisy but overall seems like it has neglible impact.  Usual chart
> attached.
>
> Thoughts/review appreciated, thanks!
>
> ~Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ubsan-Add-fsanitize-warn-once-only-emit-runtime-erro.patch
Type: application/octet-stream
Size: 15950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121213/57c92ce4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ubsan-Support-fsanitize-warn-once-only-warn-first-ti.patch
Type: application/octet-stream
Size: 18080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121213/57c92ce4/attachment-0001.obj>


More information about the cfe-dev mailing list