HomePhabricator

[ubsan] Add support for reporting diagnostics to a monitor process

Description

[ubsan] Add support for reporting diagnostics to a monitor process

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-{a,ub}san clean.

Differential Revision: https://reviews.llvm.org/D48446

Details