]> code.ossystems Code Review - openembedded-core.git/commitdiff
xserver-xorg: add a patch to aid debugging an intermittent AB failure
authorAlexander Kanavin <alex.kanavin@gmail.com>
Sun, 28 Jun 2020 15:04:35 +0000 (17:04 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Jul 2020 09:56:26 +0000 (10:56 +0100)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-dix-atom.c-make-xserver-crash-out-if-memory-cannot-b.patch [new file with mode: 0644]
meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb

diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-dix-atom.c-make-xserver-crash-out-if-memory-cannot-b.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-dix-atom.c-make-xserver-crash-out-if-memory-cannot-b.patch
new file mode 100644 (file)
index 0000000..e7f04af
--- /dev/null
@@ -0,0 +1,65 @@
+From 4ee9a5d88f0703f5a1ff53668f7bb38d06c9f3ad Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sun, 28 Jun 2020 11:57:08 +0000
+Subject: [PATCH] dix/atom.c: make xserver crash out if memory cannot be
+ allocated
+
+This patch is made strictly for debugging an intermittent autobuilder failure.
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=13908
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dix/atom.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/dix/atom.c b/dix/atom.c
+index da0adfe..32d57f8 100644
+--- a/dix/atom.c
++++ b/dix/atom.c
+@@ -70,6 +70,12 @@ static NodePtr atomRoot = NULL;
+ static unsigned long tableLength;
+ static NodePtr *nodeTable;
++void kaboom(char* msg)
++{
++    LogMessage(X_ERROR,"%s\n", msg);
++}
++
++
+ Atom
+ MakeAtom(const char *string, unsigned len, Bool makeit)
+ {
+@@ -98,12 +104,15 @@ MakeAtom(const char *string, unsigned len, Bool makeit)
+                 return (*np)->a;
+         }
+     }
++    //kaboom("error: makeatom failure 0");
+     if (makeit) {
+         NodePtr nd;
+         nd = malloc(sizeof(NodeRec));
+-        if (!nd)
++        if (!nd) {
++            kaboom("error: makeatom failure 1");
+             return BAD_RESOURCE;
++        }
+         if (lastAtom < XA_LAST_PREDEFINED) {
+             nd->string = string;
+         }
+@@ -111,6 +120,7 @@ MakeAtom(const char *string, unsigned len, Bool makeit)
+             nd->string = strndup(string, len);
+             if (!nd->string) {
+                 free(nd);
++                kaboom("error: makeatom failure 2");
+                 return BAD_RESOURCE;
+             }
+         }
+@@ -124,6 +134,7 @@ MakeAtom(const char *string, unsigned len, Bool makeit)
+                     free((char *) nd->string);
+                 }
+                 free(nd);
++                kaboom("error: makeatom failure 3");
+                 return BAD_RESOURCE;
+             }
+             tableLength <<= 1;
index 26815feb33fed77c37ae6076ff3719d45f57ab37..72d0d582ebbebe02f727a5c0cdb46deb52c433d9 100644 (file)
@@ -5,6 +5,7 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
            file://0001-test-xtest-Initialize-array-with-braces.patch \
            file://sdksyms-no-build-path.patch \
            file://0001-drmmode_display.c-add-missing-mi.h-include.patch \
+           file://0001-dix-atom.c-make-xserver-crash-out-if-memory-cannot-b.patch \
            "
 SRC_URI[md5sum] = "a770aec600116444a953ff632f51f839"
 SRC_URI[sha256sum] = "d17b646bee4ba0fb7850c1cc55b18e3e8513ed5c02bdf38da7e107f84e2d0146"