[libreoffice/f16] Resolves: rhbz#767708 write to mmap'ed file w/o disk space: SIGBUS
sbergmann
sbergmann at fedoraproject.org
Thu Dec 15 14:43:50 UTC 2011
commit d9352f932749bb99cfe962004adfe079aeba63e6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Dec 15 15:43:38 2011 +0100
Resolves: rhbz#767708 write to mmap'ed file w/o disk space: SIGBUS
...bz-767708-avoid-SIGBUS-writing-to-overcom.patch | 49 ++++++++++++++++++++
libreoffice.spec | 3 +
2 files changed, 52 insertions(+), 0 deletions(-)
---
diff --git a/0001-Resolves-rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch b/0001-Resolves-rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch
new file mode 100644
index 0000000..1b611e6
--- /dev/null
+++ b/0001-Resolves-rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch
@@ -0,0 +1,49 @@
+From d11f2ccdcecca78bc654ca0b787ea112c1dfe10c Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Thu, 15 Dec 2011 11:57:08 +0100
+Subject: [PATCH] Resolves: rhbz#767708 avoid SIGBUS writing to overcommitted
+ mmaped diskspace
+
+---
+ bridges/source/cpp_uno/shared/vtablefactory.cxx | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx
+index 2703ac0..b049c7f 100644
+--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
++++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
+@@ -40,6 +40,7 @@
+ #include "osl/mutex.hxx"
+ #include "rtl/alloc.h"
+ #include "rtl/ustring.hxx"
++#include "sal/log.hxx"
+ #include "sal/types.h"
+ #include "typelib/typedescription.hxx"
+
+@@ -65,6 +66,10 @@
+ #error Unsupported platform
+ #endif
+
++#if defined USE_DOUBLE_MMAP
++#include <fcntl.h>
++#endif
++
+ using bridges::cpp_uno::shared::VtableFactory;
+
+ namespace {
+@@ -259,9 +264,10 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 slotCount) const
+ }
+ unlink(tmpfname);
+ delete[] tmpfname;
+- if (ftruncate(block.fd, block.size) == -1)
++ int err = posix_fallocate(block.fd, 0, block.size);
++ if (err != 0)
+ {
+- perror("truncation of executable memory area failed");
++ SAL_WARN("bridges", "posix_fallocate failed with code " << err);
+ close(block.fd);
+ block.fd = -1;
+ break;
+--
+1.7.7.4
+
diff --git a/libreoffice.spec b/libreoffice.spec
index c16cca7..b6831c4 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -131,6 +131,7 @@ Patch32: 0001-Resolves-rhbz-759647-dispose-clears-mpPresTimer-befo.patch
Patch33: 0001-fdo-43308-Set-the-logic-straight-for-center-across-s.patch
Patch34: 0001-Resolves-rhbz-761009-IFSD_Equal-is-asymmetrical.patch
Patch35: 0001-Resolves-rhbz-754051-Libreoffice-calc-crashes-when-r.patch
+Patch36: 0001-Resolves-rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@@ -810,6 +811,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch33 -p1 -b .fdo43308-Set-the-logic-straight-for-center-across-s.patch
%patch34 -p1 -b .rhbz761009-IFSD_Equal-is-asymmetrical.patch
%patch35 -p1 -b .rhbz754051-Libreoffice-calc-crashes-when-r.patch
+%patch36 -p1 -b .rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch
# these are horribly incomplete--empty translations and copied english
# strings with spattering of translated strings
@@ -2124,6 +2126,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
* Tue Dec 13 2011 Caolán McNamara <caolanm at redhat.com> - 3.4.4.2-6-UNBUILT
- Resolves: rhbz#761009 IFSD_Equal is asymmetrical
- Resolves: rhbz#754051 Libreoffice calc crashes when re-opening a xlxs file
+- Resolves: rhbz#767708 write to mmap'ed file w/o disk space: SIGBUS
* Fri Dec 09 2011 Caolán McNamara <caolanm at redhat.com> - 3.4.4.2-5
- Resolves: rhbz#759647 dispose clears mpPresTimer
More information about the scm-commits
mailing list