Skip to content
Snippets Groups Projects
Commit fceacc2a authored by Robert Drab's avatar Robert Drab
Browse files

openharmony-standard-3.0: Add patch for wayland-ivi segfault


Signed-off-by: default avatarRobert Drab <robert.drab@huawei.com>
parent 75b24b47
No related branches found
No related tags found
1 merge request!25Graphic stack bringup
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
From d0e7b03296acfcdd3b68fc368e35e169ccc6a8a7 Mon Sep 17 00:00:00 2001
From: Robert Drab <robert.drab@huawei.com>
Date: Wed, 22 Jun 2022 16:18:41 +0200
Subject: [PATCH] ivi-input-controller.c: Fix g_ctx declaration causing
segfault
g_ctx was declared as a pointer instead of a structure. The problem does not
always occur as it depends on the heap layout. It was observed on qemu-arm
system.
The file is compiled with -Wno-incompatible-pointer-types flag which is hiding
following error:
../../third_party/wayland-ivi-extension/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c:101:12: error: incompatible pointer types returning 'struct input_context **' from a function with result type 'struct input_context *'; remove & [-Werror,-Wincompatible-pointer-types]
return &g_ctx;
^~~~~~
Signed-off-by: Robert Drab <robert.drab@huawei.com>
Change-Id: I38f7a4f17c611f5d265a3febe81f34e745c6956f
Upstream-Status: Submitted [https://gitee.com/openharmony/third_party_wayland-ivi-extension/pulls/21]
---
.../ivi-input-controller/src/ivi-input-controller.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
index 6e608b8..87c46e7 100644
--- a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
+++ b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
@@ -94,7 +94,7 @@ struct wl_keyboard_data {
uint32_t serial;
};
-static struct input_context *g_ctx = {0};
+static struct input_context g_ctx = {0};
struct input_context *
get_instance(void)
{
--
2.25.1
...@@ -59,6 +59,7 @@ SRC_URI += "file://display_device.c;subdir=${S}/drivers/peripheral/display/hal/d ...@@ -59,6 +59,7 @@ SRC_URI += "file://display_device.c;subdir=${S}/drivers/peripheral/display/hal/d
SRC_URI += "file://display-Use-temporary-qemuarm-implementation.patch;patchdir=${S}/drivers/peripheral" SRC_URI += "file://display-Use-temporary-qemuarm-implementation.patch;patchdir=${S}/drivers/peripheral"
SRC_URI += "file://display_gralloc_gbm.c-Use-card-drm-node.patch;patchdir=${S}/device/hihope" SRC_URI += "file://display_gralloc_gbm.c-Use-card-drm-node.patch;patchdir=${S}/device/hihope"
SRC_URI += "file://hihope-gralloc-Backport-to-3.0.patch;patchdir=${S}/device/hihope" SRC_URI += "file://hihope-gralloc-Backport-to-3.0.patch;patchdir=${S}/device/hihope"
SRC_URI += "file://ivi-input-controller.c-Fix-g_ctx-declaration-causing-segfault.patch;patchdir=${S}/third_party/wayland-ivi-extension"
inherit python3native gn_base ptest inherit python3native gn_base ptest
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment