Question about sanitizer interface

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

+eugenis, and sorry for delay, I was OOO.

+eugenis, and sorry for delay, I was OOO.

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.