[PATCH] D17262: [Compiler-rt][MSan]Fix shmat testcase: Pass SHMLBA-alligned address to shmat

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 14:42:05 PST 2016


samsonov accepted this revision.
samsonov added a comment.
This revision is now accepted and ready to land.

LGTM after fixing a bug below.


================
Comment at: lib/msan/tests/msan_test.cc:1222
@@ +1221,3 @@
+  
+  void *p;
+  if ((unsigned long)mapping_start % SHMLBA != 0) {
----------------
Shouldn't this be
  void *p = mapping_start;
?

Also, you can just unconditionally round up:
  void *p = (void*)(((unsigned long)mapping_start + SHMLBA - 1) / SHMLBA * SHMLBA);


Repository:
  rL LLVM

http://reviews.llvm.org/D17262





More information about the llvm-commits mailing list