[PATCH] D58861: [NFC][Sanitizer] Cleanup ASan's GetStackTrace implementation

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 3 20:39:43 PST 2019


vitalybuka added inline comments.


================
Comment at: compiler-rt/lib/asan/asan_stack.cc:48
+
+  ScopedUnwinding unwind_scope(t);
+  if (WillUseFastUnwind(request_fast)) {
----------------
UNREACHABLE makes it not NFC

What about:
```

  if (t && !t->isUnwinding() && WillUseFastUnwind(request_fast)) {
    ScopedUnwinding unwind_scope(t);
    uptr top = t->stack_top();
    uptr bottom = t->stack_bottom();
    if (!SANITIZER_MIPS || IsValidFrame(bp, top, bottom)) {
      UnwindFast(pc, bp, top, bottom, max_depth);
      return;
    } 
  }

#if SANITIZER_CAN_SLOW_UNWIND
    UnwindSlowWithOptionalContext(pc, context, max_depth);
#endif
```




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58861/new/

https://reviews.llvm.org/D58861





More information about the llvm-commits mailing list