[libreoffice/f15] Resolves: rhbz#767708 write to mmap'ed file w/o disk space: SIGBUS
sbergmann
sbergmann at fedoraproject.org
Thu Dec 15 14:45:34 UTC 2011
commit 6fe1edf6ed21d1652cda57ee8cb8f18e80e133ef
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Dec 15 15:45:30 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 6886e83..ece2e1c 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -168,6 +168,7 @@ Patch76: gdb-pretty-printers.patch
Patch77: 0001-gtk3-fix-cairo-canvas-crash-for-non-X-or-svp-backend.patch
Patch78: smoketestoo_native-build.patch
Patch79: 0001-Resolves-rhbz-759647-dispose-clears-mpPresTimer-befo.patch
+Patch80: 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}
@@ -886,6 +887,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch76 -p1 -b .gdb-pretty-printers.patch
%patch77 -p1 -b .gtk3-fix-cairo-canvas-crash-for-non-X-or-svp-backend.patch
%patch79 -p1 -b .rhbz759647-dispose-clears-mpPresTimer-befo.patch
+%patch80 -p1 -b .rhbz-767708-avoid-SIGBUS-writing-to-overcom.patch
touch scripting/source/pyprov/delzip
touch scripting/util/provider/beanshell/delzip
@@ -2249,6 +2251,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%changelog
* Wed Dec 07 2011 Caolán McNamara <caolanm at redhat.com> 1:3.3.4.1-2.UNBUILT
- Resolves: rhbz#759647 dispose clears mpPresTimer
+- Resolves: rhbz#767708 write to mmap'ed file w/o disk space: SIGBUS
* Wed Nov 30 2011 David Tardon <dtardon at redhat.com> 1:3.3.4.1-1
- Resolves: rhbz#747356 let Qt call XInitThreads
More information about the scm-commits
mailing list