diff options
| author | Mike Sullivan <mksully22@gmail.com> | 2018-07-10 13:48:10 +0000 |
|---|---|---|
| committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2018-07-11 14:34:52 +0000 |
| commit | 574ff71a5671c736d4c696b58d681a76adee742e (patch) | |
| tree | 0c4a08daa1e40309b4ac391a70e4c026dd12e174 /testing/bfs/fix_headroom.patch | |
| parent | a4a22ef1f529d7c02bd5d1cdf4ecc7bb69464580 (diff) | |
| download | aports-574ff71a5671c736d4c696b58d681a76adee742e.tar.bz2 aports-574ff71a5671c736d4c696b58d681a76adee742e.tar.xz | |
testing/bfs: fix ppc64le failing test and reenable
Diffstat (limited to 'testing/bfs/fix_headroom.patch')
| -rw-r--r-- | testing/bfs/fix_headroom.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/bfs/fix_headroom.patch b/testing/bfs/fix_headroom.patch new file mode 100644 index 0000000000..8d3538403b --- /dev/null +++ b/testing/bfs/fix_headroom.patch @@ -0,0 +1,20 @@ +--- a/exec.c 2018-07-10 13:36:22.698784874 +0000 ++++ b/exec.c 2018-07-10 13:37:32.296154568 +0000 +@@ -92,11 +92,16 @@ + // Assume arguments are counted with the granularity of a single page, + // and allow two pages of headroom to account for rounding as well as + // any other data we may not be counting ++ // so allow a one page cushion to account for rounding up + long page_size = sysconf(_SC_PAGESIZE); + if (page_size < 4096) { + page_size = 4096; + } +- arg_max -= 2*page_size; ++ arg_max -= page_size; ++ bfs_exec_debug(execbuf, "ARG_MAX: %ld remaining after page cushion\n", arg_max); ++ ++ // POSIX recommends an additional 2048 bytes of headroom ++ arg_max -= 2048; + bfs_exec_debug(execbuf, "ARG_MAX: %ld remaining after headroom\n", arg_max); + + if (arg_max < 0) { |
