On Fri, Jan 29, 2016 at 3:16 PM, Hans Wennborg <h...@chromium.org> wrote:
> Yes, that seems like a good idea. Go ahead and merge (or let me know > if you'd prefer me to do it). > I'd appreciate if you could do it. Thanks! > > On Fri, Jan 29, 2016 at 3:14 PM, Alexey Samsonov <vonos...@gmail.com> > wrote: > > Hans, do you think it makes sense to merge this patch into 3.8? > > > > On Fri, Jan 29, 2016 at 3:07 PM, Alexey Samsonov via cfe-commits > > <cfe-commits@lists.llvm.org> wrote: > >> > >> Author: samsonov > >> Date: Fri Jan 29 17:07:14 2016 > >> New Revision: 259260 > >> > >> URL: http://llvm.org/viewvc/llvm-project?rev=259260&view=rev > >> Log: > >> [UBSan] Add documentation for runtime issue suppression. > >> > >> Modified: > >> cfe/trunk/docs/UndefinedBehaviorSanitizer.rst > >> > >> Modified: cfe/trunk/docs/UndefinedBehaviorSanitizer.rst > >> URL: > >> > http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/UndefinedBehaviorSanitizer.rst?rev=259260&r1=259259&r2=259260&view=diff > >> > >> > ============================================================================== > >> --- cfe/trunk/docs/UndefinedBehaviorSanitizer.rst (original) > >> +++ cfe/trunk/docs/UndefinedBehaviorSanitizer.rst Fri Jan 29 17:07:14 > 2016 > >> @@ -168,6 +168,38 @@ UndefinedBehaviorSanitizer supports ``sr > >> :doc:`SanitizerSpecialCaseList`, that can be used to suppress error > >> reports > >> in the specified source files or functions. > >> > >> +Runtime suppressions > >> +-------------------- > >> + > >> +Sometimes you can suppress UBSan error reports for specific files, > >> functions, > >> +or libraries without recompiling the code. You need to pass a path to > >> +suppression file in a ``UBSAN_OPTIONS`` environment variable. > >> + > >> +.. code-block:: bash > >> + > >> + UBSAN_OPTIONS=suppressions=MyUBSan.supp > >> + > >> +You need to specify a :ref:`check <ubsan-checks>` you are suppressing > and > >> the > >> +bug location. For example: > >> + > >> +.. code-block:: bash > >> + > >> + signed-integer-overflow:file-with-known-overflow.cpp > >> + alignment:function_doing_unaligned_access > >> + vptr:shared_object_with_vptr_failures.so > >> + > >> +There are several limitations: > >> + > >> +* Sometimes your binary must have enough debug info and/or symbol > table, > >> so > >> + that the runtime could figure out source file or function name to > match > >> + against the suppression. > >> +* It is only possible to suppress recoverable checks. For the example > >> above, > >> + you can additionally pass > >> + ``-fsanitize-recover=signed-integer-overflow,alignment,vptr``, > although > >> + most of UBSan checks are recoverable by default. > >> +* Check groups (like ``undefined``) can't be used in suppressions file, > >> only > >> + fine-grained checks are supported. > >> + > >> Supported Platforms > >> =================== > >> > >> > >> > >> _______________________________________________ > >> cfe-commits mailing list > >> cfe-commits@lists.llvm.org > >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > > > > > > > > > > -- > > Alexey Samsonov > > vonos...@gmail.com > -- Alexey Samsonov vonos...@gmail.com
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits