[cfe-commits] [patch] UBSAN darwin support
Richard Smith
richard at metafoo.co.uk
Tue Oct 30 13:38:19 PDT 2012
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 --------------
A non-text attachment was scrubbed...
Name: ubsan.patch
Type: application/octet-stream
Size: 7242 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121030/476127ae/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ubsan-no-printf.diff
Type: application/octet-stream
Size: 8268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121030/476127ae/attachment-0001.obj>
More information about the cfe-commits
mailing list