[PATCH] D53040: [libFuzzer] Generalize the code for getting the previous offset for different architectures

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 17:47:42 PDT 2018


morehouse accepted this revision.
morehouse added inline comments.


================
Comment at: compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:221
+  return PC + 1;
+#endif
+}
----------------
george.karpenkov wrote:
> morehouse wrote:
> > Could we avoid putting ifdefs here?  Maybe they could go in FuzzerDefs.h.
> I don't think this is a good idea.
> 
> 1. FuzzerDefs contains constants, this is not a constant.
> 2. As the code is cloned, it would be harder to maintain parity with the code in sanitizer_common if it's significantly changed.
Ok, then let's add a comment saying where this code came from.


https://reviews.llvm.org/D53040





More information about the llvm-commits mailing list