diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-28 00:31:36 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-28 00:31:36 -0600 |
| commit | 447151dabfbad0a41c8f049938042cd886d9f451 (patch) | |
| tree | 1205f62a2d8f7bd34f3030b7715184cd622c362e /tests/tools/zos-shim/git@git.abendless.com: | |
| parent | 56bd0e6c2ab87ab140cef35882cff52153f36b7c (diff) | |
| download | zash-447151dabfbad0a41c8f049938042cd886d9f451.tar.gz | |
fix(ulimit): refuse a limit that does not fit rlim_t
`ulimit -s 18014398509481984` (2^54 kbytes = 2^64 bytes) multiplied a
64-bit value by 1024 and wrapped to 0: the command succeeded and set the
stack limit to zero. It is now "limit out of range" and status 1, and so
is a value that would come out exactly RLIM_INFINITY without the user
writing "unlimited".
The `ulimit -a` label was copied into a 64-byte buffer for no reason;
"% -20s" gets the name straight from the table. And if a build has no
RLIMIT_FSIZE entry there is no default resource at all, so say that
instead of dereferencing a null pointer.
Test: tests/zash/ulimit.sh, in a subshell so a broken build cannot take
the test shell down with it. Verified on Linux: before the change the
command exits 0 and `ulimit -s` reports 0; after it, the warning and
status 1.
Diffstat (limited to 'tests/tools/zos-shim/git@git.abendless.com:')
0 files changed, 0 insertions, 0 deletions
