From f5fcb8f43d99f718bc339c5eb1dbecefc717b706 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Tue, 15 Dec 2020 20:48:52 +0300 Subject: [PATCH] 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 --- rpmio/rpmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index 7c8b893..0d0350f 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -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) {