[PATCH] [sanitizer_common] Add internal_clone().

Alexander Potapenko glider at google.com
Fri Aug 30 08:42:00 PDT 2013


  (other comments discussed offline)


================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:376
@@ -377,1 +375,3 @@
+                     CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_UNTRACED,
+                     &tracer_thread_argument, 0, 0, 0);
   if (tracer_pid < 0) {
----------------
/*parent_tidptr*/0, ...

================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:299
@@ +298,3 @@
+  }
+  child_stack = (char *)child_stack - 2 * sizeof(void *);
+  ((void **)child_stack)[0] = (void *)(uptr)fn;
----------------
I suggest to assert that child_stack is aligned on 16.


http://llvm-reviews.chandlerc.com/D1558

BRANCH
  fix/clone

ARCANIST PROJECT
  compiler-rt



More information about the llvm-commits mailing list