[cfe-commits] [patch] UBSAN darwin support

Kostya Serebryany kcc at google.com
Wed Oct 31 07:30:47 PDT 2012


Richard,

The sanitizer_common part of your patch looks good, thanks!

--kcc

On Wed, Oct 31, 2012 at 12:38 AM, Richard Smith <richard at metafoo.co.uk>wrote:

> This LGTM for the short term, but I'd like someone with more
> familiarity with the sanitizer_common pieces to look over it too (see
> attached ubsan.patch).
>
>
> Slightly longer-term, we should move away from using fprintf and over
> to sanitizer_common's Printf implementation. There are four format
> specifiers which ubsan uses which Printf doesn't yet provide:
>
>   %08x
>   %lld
>   %llu
>   %Lg
>
> The attached patch implements the first three and ports ubsan over to
> using sanitizer_common's Printf. Two more things need doing before we
> can switch to this:
>
>  1) Implement Printf support for formatting of long double
>  2) Move the 'isatty' check into sanitizer_common, so it can do the
> right platform-specific magic and can respect calls to
> __sanitizer_set_report_path
>
> Once those are done, ubsan won't need to include any system headers
> any more. Seem reasonable?
>
> On Tue, Oct 30, 2012 at 10:22 AM, Jean-Daniel Dupas
> <devlists at shadowlab.org> wrote:
> > Ping
> >
> > Le 22 oct. 2012 à 12:51, Jean-Daniel Dupas <devlists at shadowlab.org> a
> écrit :
> >
> >> Thanks.
> >>
> >> Look like you forget to "svn add" the new Makefile and unistd.h though.
> >>
> >> Here is a rebased svn patch that include these files.
> >>
> >> Le 22 oct. 2012 à 12:31, Jonathan Sauer <jonathan.sauer at gmx.de> a
> écrit :
> >>
> >>> Hello,
> >>>
> >>> I applied the patch to compiler-rt r166410 (darwin-ubsan.patch did not
> apply cleanly, most likely due
> >>> to changes made in the meantime), and compiler-rt compiles
> successfully as part of LLVM (i.e. as
> >>> described at <http://clang.llvm.org/get_started.html>) on OS X 10.6.
> I rebased your patches to r166410
> >>> and attached the new one (made from svn instead of git, though).
> >>>
> >>>
> >>> Jonathan
> >>>
> >>> <ubsan.diff>
> >>>
> >>> _______________________________________________
> >>> cfe-commits mailing list
> >>> cfe-commits at cs.uiuc.edu
> >>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >>
> >> -- Jean-Daniel
> >>
> >>
> >>
> >> <ubsan.diff>_______________________________________________
> >> cfe-commits mailing list
> >> cfe-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
> > -- Jean-Daniel
> >
> >
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121031/8a605994/attachment.html>


More information about the cfe-commits mailing list