rpmio: Lower memory limit on 32-bit arches for xz compression, again
For armh 256 MiB delta is not enough for `w7T.xzdio`. Fixes: [armh] error: lzwrite: lzma error 5 [armh] error: lzclose: lzma error 11 [armh] error: create archive failed on file /usr/src/tmp/llvm11.0-buildroot/usr/lib/debug/.build-id/61/30f51d2a9f8b999e986a2f6c027c1266ba2cf9: cpio: write failed - Bad file descriptor Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
parent
ac623ad5b7
commit
f5fcb8f43d
@ -2886,7 +2886,7 @@ static LZFILE *lzopen_internal(const char *path, const char *mode, int fd, int x
|
||||
if ((personality(0xffffffff) & PER_MASK) == PER_LINUX32)
|
||||
memlimit = SIZE_MAX; /* 4 GiB */
|
||||
|
||||
memlimit -= SIZE_MAX >> 4; /* 256 MiB */
|
||||
memlimit -= SIZE_MAX >> 3; /* 512 MiB */
|
||||
|
||||
/* keep reducing the number of threads until memory usage gets below limit */
|
||||
while ((memory_usage = lzma_stream_encoder_mt_memusage(&mt_options)) > memlimit) {
|
||||
|
Loading…
Reference in New Issue
Block a user