[packages/xz] - rel 3; avoid trying to use more memory than 32bit process can handle
arekm
arekm at pld-linux.org
Mon Mar 4 12:20:42 CET 2013
commit 4e36462bbbd2320701b0fa5cc6106aa44de12c36
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Mar 4 12:20:39 2013 +0100
- rel 3; avoid trying to use more memory than 32bit process can handle
xz-memlimit.patch | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/xz-memlimit.patch b/xz-memlimit.patch
new file mode 100644
index 0000000..832e4ab
--- /dev/null
+++ b/xz-memlimit.patch
@@ -0,0 +1,11 @@
+--- xz-5.1.2alpha/src/xz/hardware.c~ 2013-03-04 12:15:50.213198740 +0100
++++ xz-5.1.2alpha/src/xz/hardware.c 2013-03-04 12:17:34.172318119 +0100
+@@ -62,4 +62,8 @@
+ new_memlimit = (uint32_t)new_memlimit * total_ram / 100;
+ }
++
++ // limit to some sane value (in case of 64bit host and 32bit processes)
++ if (new_memlimit >= SIZE_MAX/100 * 95)
++ new_memlimit = SIZE_MAX/100 * 95;
+
+ if (set_compress)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xz.git/commitdiff/4e36462bbbd2320701b0fa5cc6106aa44de12c36
More information about the pld-cvs-commit
mailing list