diff options
author | 2009-03-19 22:09:06 +0000 | |
---|---|---|
committer | 2009-07-18 05:30:10 +0000 | |
commit | f7e7d7cbad5b04136abbfed66726d99dd84af526 (patch) | |
tree | dac371d4168be65eccd230f24e482f138876ae5e /parse.c | |
parent | Sanitize pointer() (diff) | |
download | sparse-f7e7d7cbad5b04136abbfed66726d99dd84af526.tar.gz sparse-f7e7d7cbad5b04136abbfed66726d99dd84af526.tar.bz2 sparse-f7e7d7cbad5b04136abbfed66726d99dd84af526.zip |
Segfault at evaluate.c:341
On Thu, Mar 19, 2009 at 09:52:50PM +0000, Al Viro wrote:
Yeah... It's an old b0rken handling of calls for K&R + changes that exposed
that even worse.
Status quo is restored by the patch below, but it's a stopgap - e.g.
void f();
void g(void)
{
f(0, 0);
}
will warn about extra arguments as if we had void f(void); as sparse had
been doing all along. B0rken.
Testcase for the segfault is
void f(x, y);
void g(void)
{
f(0, 0);
}
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2210,6 +2210,7 @@ static struct token *identifier_list(struct token *token, struct symbol *fn) sym->ident = token->ident; token = token->next; sym->endpos = token->pos; + sym->ctype.base_type = &incomplete_ctype; add_symbol(list, sym); if (!match_op(token, ',') || token_type(token->next) != TOKEN_IDENT || |