Any hwasan tag checking done through runtime calls like __hwasan_mem* or __hwasan_load/store* currently raise a sigtrap on a tag mismatch. Hwasan dumps as much information it knows on the tag mismatch by placing important values in specific registers before the brk and encoding the access information in the optional argument supplied to the brk. If the platform hwasan runs on uses signal handlers, then users can see the typical pretty hwasan error report, but Fuchsia doesn't use signal handlers, so it's left up to the platform exception handler to print all this encoded information.
This patch attempts to enter the regular error reporting path via HandleTagMismatch if a new macro CAN_GET_REGISTERS is set. For now this is only defined for Fuchsia + aarch64, but can be expanded for other platforms.
Here are else #if SANITIZER_FUCHSIA is probably more appropriate
we are doing this not because regs are available, but because we can't do int3, fuchsia specific