[PATCH] [sanitizer_common] Add internal_clone().

Peter Collingbourne peter at pcc.me.uk
Fri Aug 30 10:58:29 PDT 2013



================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:347
@@ +346,3 @@
+  if (res < 0) {
+    errno = -res;
+    return -1;
----------------
The other syscall wrappers return a uptr with a potentially negative error value instead of setting errno.  You can easily do that here as well, this would also allow you to move the implementation to sanitizer_linux.cc.

================
Comment at: lib/sanitizer_common/sanitizer_linux.h:32
@@ -31,1 +31,3 @@
                           struct sigaltstack* oss);
+int internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg,
+                   int *parent_tidptr, void *newtls, int *child_tidptr);
----------------
Make this declaration conditional on defined(__x86_64__).


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

BRANCH
  fix/clone

ARCANIST PROJECT
  compiler-rt



More information about the llvm-commits mailing list