dosbox-x: upgrade 0.83.6 -> 0.83.7

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2020-11-02 00:26:50 +01:00
parent c8545696d9
commit e460305ac9
3 changed files with 3 additions and 53 deletions

View File

@@ -22,12 +22,11 @@ SRC_URI = " \
git://github.com/joncampbell123/dosbox-x.git \
file://0001-use-pkgconfig-to-find-sdl2.patch \
file://0002-Enable-unaligned-memory-based-on-recipe-s-suggestion.patch \
file://0003-menu-Fix-segfaults-during-menu-creation-in-some-envi.patch \
file://0004-Treat-all-arm-hosts-as-armv7.patch \
file://0003-Treat-all-arm-hosts-as-armv7.patch \
file://dosbox-x.desktop \
"
SRCREV = "0f1435e18d06ac955f26211541a9556bac759ae2"
PV = "0.83.6"
SRCREV = "223701a170c2a37a02bccd153147a4344e4bfa41"
PV = "0.83.7"
S = "${WORKDIR}/git"
EXTRA_OECONF = " \

View File

@@ -1,49 +0,0 @@
From 2379a88528a627c9f67655202eaa021627fc619f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Wed, 21 Oct 2020 22:06:50 +0200
Subject: [PATCH] menu: Fix segfaults during menu-creation in some environments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Yocto/Openembedded builds of dosbox-x for armv7 (Raspi4/32Bit/GCC10) segfaultet
at startup. Remote debug sessions showed that mainMenu.get_item was called
before separator_get so that vector separators was not yet prepared.
To get around, ensure separator_get is called before continuing.
Upstream-Status: Submitted[https://github.com/joncampbell123/dosbox-x/pull/1960]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/gui/menu.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp
index 30e62239f..1a76a3ce4 100644
--- a/src/gui/menu.cpp
+++ b/src/gui/menu.cpp
@@ -1272,12 +1272,18 @@ void ConstructSubMenu(DOSBoxMenu::item_handle_t item_id, const char * const * li
* array lookup, this is not very inefficient at all. */
if (!strcmp(ref,"--")) {
+ /* separator is allocated on the fly by separator_get and we cannot
+ * rely that parameters are expanded from right to left
+ * -> we must get separator handle first */
+ DOSBoxMenu::item_handle_t separator_handle = separator_get(DOSBoxMenu::separator_type_id);
mainMenu.displaylist_append(
- mainMenu.get_item(item_id).display_list, separator_get(DOSBoxMenu::separator_type_id));
+ mainMenu.get_item(item_id).display_list, separator_handle);
}
else if (!strcmp(ref,"||")) {
+ /* dito */
+ DOSBoxMenu::item_handle_t separator_handle = separator_get(DOSBoxMenu::vseparator_type_id);
mainMenu.displaylist_append(
- mainMenu.get_item(item_id).display_list, separator_get(DOSBoxMenu::vseparator_type_id));
+ mainMenu.get_item(item_id).display_list, separator_handle);
}
else if (mainMenu.item_exists(ref)) {
mainMenu.displaylist_append(
--
2.26.2