GetStackTrace implementations seem to have started out as exact copies
of the original implementation in ASan, but have diverged in subtle
ways. I left comments for these differences and will address them
according to your guidance in a follow-up patch.
Details
- Reviewers
vitalybuka
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 28568 Build 28567: arc lint + arc unit
Event Timeline
compiler-rt/lib/hwasan/hwasan.cc | ||
---|---|---|
247 | It wold be nice to have this as multiple NFC patches:
... as-is I am not 100% sure that this patch is NFC | |
251 | it must be either CHECK_EQ(0, stack->size) or = 0 | |
259 | we don't need these local variables | |
compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h | ||
166 | Can you please undo this macro? On first look I don't see value in them. | |
173 | this UNREACHABLE can be a CHECK(SANITIZER_CAN_FAST_UNWIND) in UnwindFast |
compiler-rt/lib/hwasan/hwasan.cc | ||
---|---|---|
259 | Agreed. If this would be the final version, I would inline them. | |
compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h | ||
166 | The only reason for these macros is that we can't directly do a call like stack->UnwindFast(..) from other code since it might not be available on a platform (not even a dummy symbol). Let me know if you think that having dummy implementation that errors with "not supported" is preferred over having these macros. | |
173 | I don't understand your comment. |
compiler-rt/lib/hwasan/hwasan.cc | ||
---|---|---|
251 | in other words, you can remove "investigate why this is needed" comment | |
259 | acknowledged | |
compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h | ||
166 | dummy implementation as we do for the rest of sanitizers | |
173 | if we have an implementation that if we have dummy function: |
It wold be nice to have this as multiple NFC patches:
...
as-is I am not 100% sure that this patch is NFC
with tiny patches it would be easier to nail accidental regression