rpm-build/rpmio
Vitaly Chikunov 58313570f4 rpmio: Workaround another liblzma memory allocation failure on armh
Liblzma is non-robust on memory allocation problems - while it works
well on 64-bit architectures with plenty of RAM, it's problematic on
32-bit architectures when multi-threading is used.

Try another workaround: instead of just guessing the best delta, move
half of the current (512MiB) delta into 'guard malloc' allocation test
of what LZMA encoder memusage would return.

This is definitely hackish (and vulnerable to toctou), but it's that
much we could do without significantly reworking stream_encoder_mt.

Error message:

  Wrote: /usr/src/RPM/RPMS/armh/libmozjs78-tools-78.0.1-alt2.armh.rpm (w5.lzdio)
  error: lzwrite: lzma error 5
  error: lzclose: lzma error 11
  error: create archive failed on file /usr/src/tmp/libmozjs78-buildroot/usr/lib/debug/usr/lib/libmozjs-78.so.debug: cpio: write failed - Bad file descriptor

Amends: f5fcb8f43 ("Lower memory limit on 32-bit arches for xz compression, again")
Amends: afe660558 ("Lower memory limit on 32-bit systems for xz compression")
Amends: 0b18c0498 ("prevent exceeding 32 bit memory limitations with multithreaded xz compression")
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
2021-01-16 01:57:02 +03:00
..
.lclintrc re-added .lclintrc and .cvsignore files from CVS 2002-03-25 20:27:37 +00:00
bsearch.h bsearch.h: initial revision 2011-01-06 03:30:42 +03:00
digest.c Migrate to new libbeecrypt 2010-08-12 20:41:06 +00:00
macro.c Add a built-in macro for fetching number of CPUs, affinity aware and all 2020-12-08 22:47:59 +03:00
Makefile.am Drop bzdio support 2017-11-20 01:42:20 +00:00
rpmerr.h sync with rpm4 branch: RPMERR_QUERYINFO 2002-03-25 22:09:36 +00:00
rpmio_internal.h Include local headers. 2006-05-15 03:26:57 +04:00
rpmio.c rpmio: Workaround another liblzma memory allocation failure on armh 2021-01-16 01:57:02 +03:00
rpmio.h Replace all uses of _IO_off64_t with off64_t 2019-11-24 11:58:18 +00:00
rpmlog.c fixed compilation warnings 2003-11-24 18:59:03 +00:00
rpmlog.h Initial revision 2002-03-25 20:16:26 +00:00
rpmmacro.h macro.c: replaced repeated bsearch+qsort with BSEARCH, 10x faster startup 2011-01-06 04:04:18 +03:00
rpmmalloc.c Introduce xasprintf 2019-01-10 23:20:03 +00:00
rpmmessages.h Initial revision 2002-03-25 20:16:26 +00:00
rpmpgp.c Migrate to new libbeecrypt 2010-08-12 20:41:06 +00:00
rpmpgp.h Migrate to new libbeecrypt 2010-08-12 20:41:06 +00:00
rpmrpc.c rpmio/rpmrpc.c (Glob): Override gl_stat to allow broken symlinks. 2006-10-04 16:18:09 +00:00
rpmurl.h Initial revision 2002-03-25 20:16:26 +00:00
strcasecmp.c strcasecmp.c: enhanced with table lookup 2011-01-06 03:22:55 +03:00
stubs.c Initial revision 2002-03-25 20:16:26 +00:00
tdigest.c Initial revision 2002-03-25 20:16:26 +00:00
tficl.c Initial revision 2002-03-25 20:16:26 +00:00
tkey.c Initial revision 2002-03-25 20:16:26 +00:00
tring.c Initial revision 2002-03-25 20:16:26 +00:00
trpmio.c Initial revision 2002-03-25 20:16:26 +00:00
ugid.c Initial revision 2002-03-25 20:16:26 +00:00
ugid.h Initial revision 2002-03-25 20:16:26 +00:00
url.c fixed rpmExpand usage 2005-09-29 16:01:17 +00:00