android_kernel_motorola_sm6375/scripts/kconfig
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dirk Gouders e983b7b17a kconfig/menu.c: fix multiple references to expressions in menu_add_prop()
menu_add_prop() applies upper menus' visibilities to actual prompts
by AND-ing the prompts visibilities with the upper menus ones.

This creates a further reference to the menu's visibilities and when
the expression reduction functions do their work, they may remove or
modify expressions that have multiple references, thus causing
unpredictable side-effects.

The following example Kconfig constructs a case where this causes
problems: a menu and a prompt which's visibilities depend on the same
symbol.  When invoking mconf with this Kconfig and pressing "Z" we
see a problem caused by a free'd expression still referenced by the
menu's visibility:

------------------------------------------------------------------------
mainmenu "Kconfig Testing Configuration"

config VISIBLE
	def_bool n

config Placeholder
	bool "Place holder"

menu "Invisible"
	visible if VISIBLE

config TEST_VAR
	bool "Test option" if VISIBLE

endmenu
------------------------------------------------------------------------

This patch fixes this problem by creating copies of the menu's
visibility expressions before AND-ing them with the prompt's one.

Signed-off-by: Dirk Gouders <dirk@gouders.net>
[yann.morin.1998@free.fr: move variable into its block-scope,
                          keep lines <80 chars, typo]
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-05-30 00:14:01 +02:00
..
lxdialog mconf: handle keys in empty dialogs 2013-05-30 00:13:32 +02:00
.gitignore
check.sh
conf.c kconfig: allow specifying the seed for randconfig 2013-04-25 00:16:25 +02:00
confdata.c Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" 2013-04-26 23:21:59 +02:00
expr.c
expr.h
gconf.c
gconf.glade
images.c
kxgettext.c
list.h kconfig: fix lists definition for C++ 2013-04-29 19:55:56 +02:00
lkc.h
lkc_proto.h
Makefile
mconf.c mconf: handle keys in empty dialogs 2013-05-30 00:13:32 +02:00
menu.c kconfig/menu.c: fix multiple references to expressions in menu_add_prop() 2013-05-30 00:14:01 +02:00
merge_config.sh
nconf.c
nconf.gui.c
nconf.h
POTFILES.in
qconf.cc
qconf.h
streamline_config.pl localmodconfig: Process source kconfig files as they are found 2013-04-29 15:41:51 -04:00
symbol.c
util.c
zconf.gperf
zconf.hash.c_shipped
zconf.l
zconf.lex.c_shipped
zconf.tab.c_shipped
zconf.y