Intercept all *SAN printf calls and provide the resulting string to a user-provided callback. This can be used to extract error messages and log them appropriately.
Details
Diff Detail
- Repository
- rCRT Compiler Runtime
Event Timeline
Can you please reupload with more context (-U9999 or similar when creating the diff)?
Can we also get a testcase that actually uses this feature? It looks like the change in error_report_callback.cc doesn't really check that the callback is called, how many times it's called or that the strings are what's expected.
@kcc: I am hoping that this work is duplicated and I can use something else - I am more than open to another, existing API.
@kubamracek : I am not sure how to reupload with context - I have a raw diff - but I will work on that (and the test case).
It seems that the existing weak OnPrint could fulfill the purpose of an application defined "callback" .
Right now it's not be used by any of the sanitizers, and having a weak function & 8 callbacks serving the same purpose seems overkill.
It seems that the existing weak OnPrint could fulfill the purpose of an application defined "callback" .
That looks like it would be perfect for my needs - thank you!