mirror of https://github.com/ericonr/ep.git
Érico Nogueira
bd30334277
8KB was empirically determined to work on musl. We can't go lower (musl supports up to 2KB) because posix_spawn allocates a temporary stack for vfork (via clone(2)) on its own stack. This improves our resource consumption and increases the likeliness for pthread_create to work even when there isn't a lot of free memory. Using pthread_setattr_default_np isn't possible, because on musl it doesn't allow us to go below the default thread stack size. This way is also more portable. We don't remove the guard pages entirely, because a shell prompt might be active in attacker controlled directories, and it's a reasonable protection against any stack overflow exploits that might appear. |
||
---|---|---|
po | ||
.gitignore | ||
Makefile | ||
colors.c | ||
colors.h | ||
ep.c | ||
ep.h | ||
git.c | ||
lang.c | ||
out.c | ||
path.c | ||
ssh.c |