[cfe-dev] Question about sanitizer interface

Oliver Schneider oliver at f-prot.com
Thu Apr 23 06:12:46 PDT 2015


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.

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?

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? ...



More information about the cfe-dev mailing list