[PATCH] [UBsan] Dumping call stacks when reporting bad-cast (-fsanitize=vptr)

Byoungyoung Lee byoungyoung at google.com
Thu Jul 24 00:29:56 PDT 2014


Thanks Alexey for turning my sloppy patch into way better one!

Yes, I was calling the InitializeSanitizerCommon() in the early phase to
initialize UBSan before the Chrome sandbox kick in. As I tried Clang ToT
today, I found another issue that UBSAN_OPTIONS was not visible in
InitializeSanitizerCommon() for Chrome (I suspect this is also related to
the Chrome sandboxing, but haven't verified yet). Please let me try more
tomorrow.

Thanks,
Byoungyoung




On Wed, Jul 23, 2014 at 12:01 PM, Alexey Samsonov <vonosmas at gmail.com>
wrote:

> I've incorporated your patch into r213783. Now if you want to see stack
> traces in vptr checker, but don't want to run online symbolization you can
> provide UBSAN_OPTIONS="symbolize=0 print_stacktrace=1". Let me know if
> you're OK with this change. One thing that wasn't submitted is call to
> InitializeSanitizerCommon() early in __ubsan_handle_dynamic_type_cache_miss
> (before we even check for duplicated report or for cache miss). It would be
> really costly and weird to add initialization at this place. I assume that
> you're trying to initialize UBSan as early as possible in presence of
> Chromium sandbox. Is that right?
>
>
> On Wed, Jul 23, 2014 at 8:53 AM, Byoungyoung Lee <byoungyoung at google.com>
> wrote:
>
>> Thank you Alexey!
>>
>>
>> On Tue, Jul 22, 2014 at 6:24 PM, Alexey Samsonov <vonosmas at gmail.com>
>> wrote:
>>
>>> FYI I'm working on a slightly modified version of this patch. Will
>>> update this thread tomorrow.
>>>
>>> http://reviews.llvm.org/D4410
>>>
>>>
>>>
>>
>
>
> --
> Alexey Samsonov
> vonosmas at gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140724/b51cbee4/attachment.html>


More information about the llvm-commits mailing list