[PATCH] D69579: [libFuzzer] Fix unwinding for Fuchsia
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 11:15:37 PST 2019
phosek added inline comments.
================
Comment at: compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp:89
+// on top of their rsp).
+constexpr size_t cfa_offset = 128 + sizeof(zx_thread_state_general_regs_t);
+#elif defined(__aarch64__)
----------------
s/cfa_offset/CFAOffset/ to follow LLVM naming conventions.
================
Comment at: compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp:91
+#elif defined(__aarch64__)
+// In arm64 we need to always have the stack pointer aligned to 16 bytes, so we
+// make sure that we are keeping that same alignment.
----------------
Nit: s/arm64/aarch64/ for consistency.
================
Comment at: compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp:147
-#else
-#error "Unsupported architecture for fuzzing on Fuchsia"
#endif
----------------
Can you leave this here as well?
================
Comment at: compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp:193
+// * Storing all registers at the point of crash in the stack and refer to them
+// via cfi information (relative to the cfa).
+// * Setting the return column so the unwinder knows how to continue unwinding.
----------------
Nit: be consistent about the case for CFI and CFA in comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69579/new/
https://reviews.llvm.org/D69579
More information about the llvm-commits
mailing list