Skip to content

Commit 4b20e10

Browse files
committed
Revert "kconfig: qconf: don't show goback button on splitMode"
This reverts commit cc1c08e. Maxim Levitsky reports 'make xconfig' crashes since that commit (https://lkml.org/lkml/2020/7/18/411) Or, the following is simple test code that makes it crash: menu "Menu" config FOO bool "foo" default y menuconfig BAR bool "bar" depends on FOO endmenu Select the Split View mode, and double-click "bar" in the right window, then you will see Segmentation fault. When 'last' is not set for symbolMode, the following code in ConfigList::updateList() calls firstChild(). item = last ? last->nextSibling() : firstChild(); However, the pointer returned by ConfigList::firstChild() does not seem to be compatible with (ConfigItem *), which seems another bug. I'd rather want to reconsider whether hiding the goback icon is the right thing to do. In the following test code, the Split View shows "Menu2" and "Menu3" in the right window. You can descend into "Menu3", but there is no way to ascend back to "Menu2" from "Menu3". menu "Menu1" config FOO bool "foo" default y menu "Menu2" depends on FOO menu "Menu3" config BAZ bool "baz" endmenu endmenu endmenu It is true that the goback button is currently not functional due to yet another bug, but hiding the problem is not the right way to go. Anyway, Segmentation fault is fatal. Revert the offending commit for now, and we should find the right solution. Reported-by: Maxim Levitsky <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 97bebbc commit 4b20e10

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/kconfig/qconf.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,9 @@ void ConfigList::updateList(ConfigItem* item)
428428
if (rootEntry != &rootmenu && (mode == singleMode ||
429429
(mode == symbolMode && rootEntry->parent != &rootmenu))) {
430430
item = (ConfigItem *)topLevelItem(0);
431-
if (!item && mode != symbolMode) {
431+
if (!item)
432432
item = new ConfigItem(this, 0, true);
433-
last = item;
434-
}
433+
last = item;
435434
}
436435
if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
437436
rootEntry->sym && rootEntry->prompt) {

0 commit comments

Comments
 (0)