https://llvm.org/bugs/show_bug.cgi?id=27191

            Bug ID: 27191
           Summary: Incorrect child stack alignment in
                    test/asan/TestCases/Linux/clone_test.cc
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedb...@nondot.org
          Reporter: hjl.to...@gmail.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

test/asan/TestCases/Linux/clone_test.cc has

int main(int argc, char **argv) {
  int i;
  const int kStackSize = 1 << 20;
  char child_stack[kStackSize + 1];
  char *sp = child_stack + kStackSize;  /* Stack grows down. */
  printf("Parent: %p\n", sp);
  pid_t clone_pid = clone(Child, sp, CLONE_FILES | CLONE_VM, NULL, 0, 0, 0);

There is no guarantee that "sp" will be aligned at 16 bytes, which
is required by x86 psABIs.  It should be changed to

char child_stack[kStackSize + 1] __attribute__ ((aligned (16)));

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to