From: Martin Walch <walch.martin@web.de>
To: linux-kbuild@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>,
"Yann E. MORIN" <yann.morin.1998@free.fr>,
Dirk Gouders <dirk@gouders.net>,
Andrew Morton <akpm@linux-foundation.org>,
Libo Chen <libo.chen@huawei.com>
Subject: Segmentation Fault with 'm' Dependencies
Date: Mon, 28 Oct 2013 03:16:27 +0100 [thread overview]
Message-ID: <4647748.CU0TquGsxA@tacticalops> (raw)
Hello,
this test case leads to a segmentation fault:
config A
tristate "A" if m
config MODULES
boolean "MODULES"
option modules
As you can see, the MODULES symbol with the option modules is declared after
the first occurrence of an 'm' dependency. (Actually you can drop the MODULES
section or use a different symbol name. It does not matter.) Internally 'm' gets
converted into (symbol_mod && modules_sym), which adds a dependency on a
bad symbol, finally leading to dereferencing a null pointer.
If you move the declaration of the MODULES symbol to the top, everything
works fine.
The crash has been introduced last month with
> 6902dccfda005fa4c42410fa064fdd331ab42479
> kconfig: do not special-case 'MODULES' symbol
However, things were probably broken before. The problem has only
become visible.
The reason that configuring a Linux kernel does not crash the
configuration system is that there is currently no architecture that has a
symbol with a dependency on 'm' anywhere before the MODULES symbol.
Regards
Martin Walch
--
next reply other threads:[~2013-10-28 2:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 2:16 Martin Walch [this message]
2013-11-05 23:06 ` Segmentation Fault with 'm' Dependencies Yann E. MORIN
2013-11-19 20:57 ` Dirk Gouders
2013-11-19 21:08 ` [PATCH] scripts/kconfig: handle cases with 'option modules' defined after reference Dirk Gouders
2013-11-19 21:39 ` Segmentation Fault with 'm' Dependencies Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4647748.CU0TquGsxA@tacticalops \
--to=walch.martin@web.de \
--cc=akpm@linux-foundation.org \
--cc=dirk@gouders.net \
--cc=libo.chen@huawei.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox