kconfig: fix segfault when detecting recursive dependency
authorSam Ravnborg <sam@ravnborg.org>
Sat, 14 Aug 2010 12:40:00 +0000 (14:40 +0200)
committerMichal Marek <mmarek@suse.cz>
Sat, 14 Aug 2010 22:32:13 +0000 (00:32 +0200)
commit3643f849d7da5c12da589beb03c12303fe79b841
tree60cfbd4ee780bbcde2d7013a2ed8c1dc6ace42c0
parent84062dd3a6a045395a43de1d9adc9b8eb2d1426e
kconfig: fix segfault when detecting recursive dependency

Following sample Kconfig generated a segfault:

config FOO
        bool
        select PERF_EVENTS if HAVE_HW_BREAKPOINT

config PERF_EVENTS
        bool

config HAVE_HW_BREAKPOINT
        bool
        depends on PERF_EVENTS

Fix by reverting back to a valid property if there was no
property on the stack of symbols.

The above pattern were seen in sh Kconfig.
A fix for the Kconfig file has been sent to the sh folks.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/kconfig/symbol.c