diff options
author | Luca Bruno <lethalman88@gmail.com> | 2015-12-11 18:31:00 +0100 |
---|---|---|
committer | Luca Bruno <lethalman88@gmail.com> | 2015-12-11 18:31:00 +0100 |
commit | 5b0352a6a43fdd924a53cde4b81c15b755fa0a27 (patch) | |
tree | cf0fcc2be2f6d08c970f0322a63ff0a31d5d5dee /pkgs/servers/x11 | |
parent | 2f0fe05543ce594eacf0310966914d6e19a42f88 (diff) | |
parent | 146784f835a6cadc65812c5adf76533c18e5be61 (diff) | |
download | nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.gz nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.bz2 nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.lz nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.xz nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.zst nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.zip |
Merge branch 'master' into closure-size
Diffstat (limited to 'pkgs/servers/x11')
-rw-r--r-- | pkgs/servers/x11/xorg/default.nix | 6 | ||||
-rw-r--r-- | pkgs/servers/x11/xorg/fix_segfault.patch | 63 | ||||
-rw-r--r-- | pkgs/servers/x11/xorg/overrides.nix | 2 |
3 files changed, 4 insertions, 67 deletions
diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index e872718a8072..2916edd1ab3d 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -2108,11 +2108,11 @@ let }) // {inherit ;}; xorgserver = (mkDerivation "xorgserver" { - name = "xorg-server-1.17.2"; + name = "xorg-server-1.17.4"; builder = ./builder.sh; src = fetchurl { - url = mirror://xorg/individual/xserver/xorg-server-1.17.2.tar.bz2; - sha256 = "14vr4mm0x94a9bd3sfx9mdh8qhvk48zcml3i8q1wbwi84xhj04gn"; + url = mirror://xorg/individual/xserver/xorg-server-1.17.4.tar.bz2; + sha256 = "0mv4ilpqi5hpg182mzqn766frhi6rw48aba3xfbaj4m82v0lajqc"; }; buildInputs = [pkgconfig dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ]; }) // {inherit dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ;}; diff --git a/pkgs/servers/x11/xorg/fix_segfault.patch b/pkgs/servers/x11/xorg/fix_segfault.patch deleted file mode 100644 index b3a7d2ed5e00..000000000000 --- a/pkgs/servers/x11/xorg/fix_segfault.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 7cc7ffd25d5e50b54cb942d07d4cb160f20ff9c5 Mon Sep 17 00:00:00 2001 -From: Martin Peres <martin.peres@linux.intel.com> -Date: Fri, 17 Jul 2015 17:21:26 +0300 -Subject: [PATCH] os: make sure the clientsWritable fd_set is initialized - before use - -In WaitForSomething(), the fd_set clientsWritable may be used unitialized when -the boolean AnyClientsWriteBlocked is set in the WakeupHandler(). This leads to -a crash in FlushAllOutput() after x11proto's commit -2c94cdb453bc641246cc8b9a876da9799bee1ce7. - -The problem did not manifest before because both the XFD_SIZE and the maximum -number of clients were set to 256. As the connectionTranslation table was -initalized for the 256 clients to 0, the test on the index not being 0 was -aborting before dereferencing the client #0. - -As of commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7 in x11proto, the XFD_SIZE -got bumped to 512. This lead the OutputPending fd_set to have any fd above 256 -to be uninitialized which in turns lead to reading an index after the end of -the ConnectionTranslation table. This index would then be used to find the -client corresponding to the fd marked as pending writes and would also result -to an out-of-bound access which would usually be the fatal one. - -Fix this by zeroing the clientsWritable fd_set at the beginning of -WaitForSomething(). In this case, the bottom part of the loop, which would -indirectly call FlushAllOutput, will not do any work but the next call to -select will result in the execution of the right codepath. This is exactly what -we want because we need to know the writable clients before handling them. In -the end, it also makes sure that the fds above MaxClient are initialized, -preventing the crash in FlushAllOutput(). - -Thanks to everyone involved in tracking this one down! - -Reported-by: Karol Herbst <freedesktop@karolherbst.de> -Reported-by: Tobias Klausmann <tobias.klausmann@mni.thm.de> -Signed-off-by: Martin Peres <martin.peres@linux.intel.com> -Tested-by: Martin Peres <martin.peres@linux.intel.com> -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91316 -Cc: Ilia Mirkin <imirkin@alum.mit.edu> -Cc: Martin Peres <martin.peres@linux.intel.com> -Cc: Olivier Fourdan <ofourdan@redhat.com -Cc: Adam Jackson <ajax@redhat.com> -Cc: Alan Coopersmith <alan.coopersmith@oracle.com -Cc: Chris Wilson <chris@chris-wilson.co.uk> ---- - os/WaitFor.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/os/WaitFor.c b/os/WaitFor.c -index 431f1a6..993c14e 100644 ---- a/os/WaitFor.c -+++ b/os/WaitFor.c -@@ -158,6 +158,7 @@ WaitForSomething(int *pClientsReady) - Bool someReady = FALSE; - - FD_ZERO(&clientsReadable); -+ FD_ZERO(&clientsWritable); - - if (nready) - SmartScheduleStopTimer(); --- -2.4.5 - diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index ac3a4a8d1159..b03edff3fa7f 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -378,7 +378,7 @@ in dri2proto dri3proto kbproto xineramaproto resourceproto scrnsaverproto videoproto ]; # fix_segfault: https://bugs.freedesktop.org/show_bug.cgi?id=91316 - commonPatches = [ ./xorgserver-xkbcomp-path.patch ./fix_segfault.patch ]; + commonPatches = [ ./xorgserver-xkbcomp-path.patch ]; # XQuartz requires two compilations: the first to get X / XQuartz, # and the second to get Xvfb, Xnest, etc. darwinOtherX = overrideDerivation xorgserver (oldAttrs: { |