Add support to the ubsan runtime for reporting diagnostics to a monitor
process (e.g a debugger).
The Xcode IDE uses this by setting a breakpoint on ubsan_on_report and
collecting diagnostic information via ubsan_get_current_report_data,
which it then surfaces to users in the editor UI.
Testing for this functionality already exists in upstream lldb, here:
lldb/packages/Python/lldbsuite/test/functionalities/ubsan
Apart from that, this is ninja check-ubsan clean.
I'd prefer interface consistent with similar one from TSAN:
__tsan_on_report(void *report) {
}
Also this will avoid having state set by RegisterUndefinedBehaviorReport