diff options
-rw-r--r-- | meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-dix-atom.c-make-xserver-crash-out-if-memory-cannot-b.patch | 65 | ||||
-rw-r--r-- | meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb | 1 |
2 files changed, 66 insertions, 0 deletions
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 index 00000000000..e7f04af4ff3 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-dix-atom.c-make-xserver-crash-out-if-memory-cannot-b.patch @@ -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; diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb index 26815feb33f..72d0d582ebb 100644 --- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb @@ -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" |