daemon: On aarch64, use increments of 16 on the stack.

* nix/libstore/build.cc (DerivationGoal::startBuilder): When on aarch64,
when calling clone(), increment the stack by 16.
master
Efraim Flashner 2017-08-05 22:36:10 +03:00
parent 9833bcfc08
commit 31ed845b70
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 5 additions and 1 deletions

View File

@ -2008,7 +2008,11 @@ void DerivationGoal::startBuilder()
char stack[32 * 1024];
int flags = CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWIPC | CLONE_NEWUTS | SIGCHLD;
if (!fixedOutput) flags |= CLONE_NEWNET;
pid = clone(childEntry, stack + sizeof(stack) - 8, flags, this);
#ifdef __aarch64__
pid = clone(childEntry, stack + sizeof(stack) - 16, flags, this);
#else
pid = clone(childEntry, stack + sizeof(stack) - 8, flags, this);
#endif
if (pid == -1)
throw SysError("cloning builder process");
} else