* [Buildroot] [PATCH 1/1] package/cog: add patch fixing cog segfault
@ 2020-02-18 8:43 James Hilliard
2020-02-18 14:08 ` Adrian Perez de Castro
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: James Hilliard @ 2020-02-18 8:43 UTC (permalink / raw)
To: buildroot
Fixes:
Thread 1 "cog" received signal SIGSEGV, Segmentation fault.
xkb_state_update_mask (state=0x0, base_mods=0, latched_mods=0, locked_mods=0, base_group=base_group at entry=0, latched_group=latched_group at entry=0, locked_group=0) at ../src/state.c:814
814 prev_components = state->components;
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
...ata.state-is-not-null-before-calling.patch | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 package/cog/0001-fdo-ensure-xkb_data.state-is-not-null-before-calling.patch
diff --git a/package/cog/0001-fdo-ensure-xkb_data.state-is-not-null-before-calling.patch b/package/cog/0001-fdo-ensure-xkb_data.state-is-not-null-before-calling.patch
new file mode 100644
index 0000000000..4e8d4ad121
--- /dev/null
+++ b/package/cog/0001-fdo-ensure-xkb_data.state-is-not-null-before-calling.patch
@@ -0,0 +1,30 @@
+From 9f1f1e64b65e6680d5cdedf5a3b753ef85fc01f4 Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+Date: Tue, 18 Feb 2020 01:20:50 -0700
+Subject: [PATCH] fdo: ensure xkb_data.state is not null before calling
+ xkb_state_update_mask (#180)
+
+[james.hilliard1 at gmail.com: backport from upstream commit
+9f1f1e64b65e6680d5cdedf5a3b753ef85fc01f4]
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+---
+ platform/cog-platform-fdo.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/platform/cog-platform-fdo.c b/platform/cog-platform-fdo.c
+index 36177fc..e6f1cb5 100644
+--- a/platform/cog-platform-fdo.c
++++ b/platform/cog-platform-fdo.c
+@@ -894,6 +894,9 @@ keyboard_on_modifiers (void *data,
+ uint32_t mods_locked,
+ uint32_t group)
+ {
++ if (xkb_data.state == NULL)
++ return;
++
+ xkb_state_update_mask (xkb_data.state,
+ mods_depressed,
+ mods_latched,
+--
+2.20.1
+
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/cog: add patch fixing cog segfault
2020-02-18 8:43 [Buildroot] [PATCH 1/1] package/cog: add patch fixing cog segfault James Hilliard
@ 2020-02-18 14:08 ` Adrian Perez de Castro
2020-02-18 17:39 ` Thomas Petazzoni
2020-03-13 16:23 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Adrian Perez de Castro @ 2020-02-18 14:08 UTC (permalink / raw)
To: buildroot
On Tue, 18 Feb 2020 01:43:39 -0700, James Hilliard <james.hilliard1@gmail.com> wrote:
> Fixes:
> Thread 1 "cog" received signal SIGSEGV, Segmentation fault.
> xkb_state_update_mask (state=0x0, base_mods=0, latched_mods=0, locked_mods=0, base_group=base_group at entry=0, latched_group=latched_group at entry=0, locked_group=0) at ../src/state.c:814
> 814 prev_components = state->components;
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Acked-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
> ...ata.state-is-not-null-before-calling.patch | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
> create mode 100644 package/cog/0001-fdo-ensure-xkb_data.state-is-not-null-before-calling.patch
>
> diff --git a/package/cog/0001-fdo-ensure-xkb_data.state-is-not-null-before-calling.patch b/package/cog/0001-fdo-ensure-xkb_data.state-is-not-null-before-calling.patch
> new file mode 100644
> index 0000000000..4e8d4ad121
> --- /dev/null
> +++ b/package/cog/0001-fdo-ensure-xkb_data.state-is-not-null-before-calling.patch
> @@ -0,0 +1,30 @@
> +From 9f1f1e64b65e6680d5cdedf5a3b753ef85fc01f4 Mon Sep 17 00:00:00 2001
> +From: James Hilliard <james.hilliard1@gmail.com>
> +Date: Tue, 18 Feb 2020 01:20:50 -0700
> +Subject: [PATCH] fdo: ensure xkb_data.state is not null before calling
> + xkb_state_update_mask (#180)
> +
> +[james.hilliard1 at gmail.com: backport from upstream commit
> +9f1f1e64b65e6680d5cdedf5a3b753ef85fc01f4]
> +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> +---
> + platform/cog-platform-fdo.c | 3 +++
> + 1 file changed, 3 insertions(+)
> +
> +diff --git a/platform/cog-platform-fdo.c b/platform/cog-platform-fdo.c
> +index 36177fc..e6f1cb5 100644
> +--- a/platform/cog-platform-fdo.c
> ++++ b/platform/cog-platform-fdo.c
> +@@ -894,6 +894,9 @@ keyboard_on_modifiers (void *data,
> + uint32_t mods_locked,
> + uint32_t group)
> + {
> ++ if (xkb_data.state == NULL)
> ++ return;
> ++
> + xkb_state_update_mask (xkb_data.state,
> + mods_depressed,
> + mods_latched,
> +--
> +2.20.1
> +
> --
> 2.20.1
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200218/940e17ea/attachment.asc>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/cog: add patch fixing cog segfault
2020-02-18 8:43 [Buildroot] [PATCH 1/1] package/cog: add patch fixing cog segfault James Hilliard
2020-02-18 14:08 ` Adrian Perez de Castro
@ 2020-02-18 17:39 ` Thomas Petazzoni
2020-03-13 16:23 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2020-02-18 17:39 UTC (permalink / raw)
To: buildroot
On Tue, 18 Feb 2020 01:43:39 -0700
James Hilliard <james.hilliard1@gmail.com> wrote:
> Fixes:
> Thread 1 "cog" received signal SIGSEGV, Segmentation fault.
> xkb_state_update_mask (state=0x0, base_mods=0, latched_mods=0, locked_mods=0, base_group=base_group at entry=0, latched_group=latched_group at entry=0, locked_group=0) at ../src/state.c:814
> 814 prev_components = state->components;
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> ...ata.state-is-not-null-before-calling.patch | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
> create mode 100644 package/cog/0001-fdo-ensure-xkb_data.state-is-not-null-before-calling.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/cog: add patch fixing cog segfault
2020-02-18 8:43 [Buildroot] [PATCH 1/1] package/cog: add patch fixing cog segfault James Hilliard
2020-02-18 14:08 ` Adrian Perez de Castro
2020-02-18 17:39 ` Thomas Petazzoni
@ 2020-03-13 16:23 ` Peter Korsgaard
2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2020-03-13 16:23 UTC (permalink / raw)
To: buildroot
>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> writes:
> Fixes:
> Thread 1 "cog" received signal SIGSEGV, Segmentation fault.
> xkb_state_update_mask (state=0x0, base_mods=0, latched_mods=0,
> locked_mods=0, base_group=base_group at entry=0,
> latched_group=latched_group at entry=0, locked_group=0) at
> ../src/state.c:814
> 814 prev_components = state->components;
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Committed to 2019.11.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-13 16:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-18 8:43 [Buildroot] [PATCH 1/1] package/cog: add patch fixing cog segfault James Hilliard
2020-02-18 14:08 ` Adrian Perez de Castro
2020-02-18 17:39 ` Thomas Petazzoni
2020-03-13 16:23 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox