[gwp_asan] Use __sanitizer_fast_backtrace on Fuchsia am: e2919d1a60 am: ac2bcb8cae am: 4ebf57df6a

Original change: https://android-review.googlesource.com/c/platform/external/gwp_asan/+/1703586

Change-Id: Ia07687bb511314f08bd2b0228ce83413347d5ad1
diff --git a/gwp_asan/optional/backtrace_fuchsia.cpp b/gwp_asan/optional/backtrace_fuchsia.cpp
index 879312a..09b0325 100644
--- a/gwp_asan/optional/backtrace_fuchsia.cpp
+++ b/gwp_asan/optional/backtrace_fuchsia.cpp
@@ -8,12 +8,18 @@
 
 #include "gwp_asan/optional/backtrace.h"
 
-// GWP-ASan on Fuchsia doesn't currently support backtraces.
+#include <zircon/sanitizer.h>
 
 namespace gwp_asan {
 namespace backtrace {
 
-options::Backtrace_t getBacktraceFunction() { return nullptr; }
+// Fuchsia's C library provides safe, fast, best-effort backtraces itself.
+options::Backtrace_t getBacktraceFunction() {
+  return __sanitizer_fast_backtrace;
+}
+
+// These are only used in fatal signal handling, which is not used on Fuchsia.
+
 PrintBacktrace_t getPrintBacktraceFunction() { return nullptr; }
 SegvBacktrace_t getSegvBacktraceFunction() { return nullptr; }