[llvm-bugs] [Bug 27191] New: Incorrect child stack alignment in test/asan/TestCases/Linux/clone_test.cc
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Apr 3 07:18:49 PDT 2016
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: unassignedbugs at nondot.org
Reporter: hjl.tools at gmail.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160403/24b8211c/attachment.html>
More information about the llvm-bugs
mailing list