| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|