[PATCH] D29586: [lsan] Enable LSan for arm Linux

Yury Gribov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 11:13:13 PST 2017


ygribov added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1253
+  ((unsigned int *)child_stack)[1] = (uptr)arg;
+  register int r0 __asm__("r0") = flags;
+  register void *r1 __asm__("r1") = child_stack;
----------------
rengolin wrote:
> This sequence doesn't coincide with the order of parameters above, and can lead to unexpected results.
> 
> Why do you need to reserve the registers in this code at all?
Why should it? The sole purpose of register annotations is to pass arguments to swi call below.


Repository:
  rL LLVM

https://reviews.llvm.org/D29586





More information about the llvm-commits mailing list