[cfe-dev] Question about sanitizer interface

Evgeniy Stepanov eugenis at google.com
Wed May 6 12:33:50 PDT 2015


On Wed, May 6, 2015 at 9:00 AM, Kostya Serebryany <kcc at google.com> wrote:
> +eugenis, and sorry for delay, I was OOO.
>
> On Thu, Apr 23, 2015 at 6:12 AM, Oliver Schneider <oliver at f-prot.com> wrote:
>>
>> Hi,
>>
>> while extending some of my code to also act on MSan crashes instead of
>> just ASan, I noticed that not all callbacks are available for MSan.
>>
>> In ASan I used the
>>
>>   void __asan_set_error_report_callback(void (*callback)(const char*));
>>
>> to relay information back to the parent process via a shared memory
>>
>> object. However, for MSan no similar functionality exists.
>
>
> Agree. it would be nice to unify this functionality between asan, msan and
> others.
> It's just not done.
>
>>
>>
>> Is there a way to get this functionality also in MSan? I.e. being able
>> to capture the error report contents in their string form?
>>

This should be quite straighforward.

> Evgeniy?
>
>>
>> I'm using version 3.6.1 at the moment.
>>
>> Thanks,
>>
>> // Oliver
>>
>> PS: on a related note; I found:
>>
>> 117   // Deprecated. Call __sanitizer_set_death_callback instead.
>> 118   void __asan_set_death_callback(void (*callback)(void));
>>
>> which suggests that the same would hold for the MSan counterpart.
>> However, there is just says:
>>
>>  92   /* Sets the callback to be called right before death on error.
>>  93      Passing 0 will unset the callback. */
>>  94   void __msan_set_death_callback(void (*callback)(void));
>>
>> Is this intentional or owed to the fact that ASan is more actively
>> developed or so? ...
>
>
> This is just not done (but should be).
> We'll need it ourselves eventually, but if you send us a patch (to
> llvm-commits, using Phabricator)
> it may get there sooner. :)
>
> --kcc
>
>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>



More information about the cfe-dev mailing list