From: Martin Nagy <nagy.martin@gmail.com>
To: linux-sparse@vger.kernel.org
Subject: Re: [PATCH] Print an error if typeof() lacks an argument
Date: Sat, 25 Apr 2009 13:11:17 +0200 [thread overview]
Message-ID: <20090425131117.30242d75@notas> (raw)
In-Reply-To: <20090425130343.3df87cbb@notas>
[-- Attachment #1: Type: text/plain, Size: 425 bytes --]
Martin Nagy wrote:
>
> We weren't checking if the initializer isn't NULL, which caused sparse
> to segfault later on when performing lazy evaluation in classify_type().
>
> Signed-off-by: Martin Nagy <nagy.martin@gmail.com>
I accidentally sent this from my work email address, which is
different than the sign-off address, sorry. I'm not sure if that's
an issue, but just to make sure, I'm sending the patch again.
Martin
[-- Attachment #2: 0001-Print-an-error-if-typeof-lacks-an-argument.patch --]
[-- Type: text/x-patch, Size: 941 bytes --]
From 962e4b1ad3b3cb13c7427d07dfa44cd15af11693 Mon Sep 17 00:00:00 2001
From: Martin Nagy <nagy.martin@gmail.com>
Date: Sat, 25 Apr 2009 12:56:33 +0200
Subject: [PATCH] Print an error if typeof() lacks an argument
We weren't checking if the initializer isn't NULL, which caused sparse
to segfault later on when performing lazy evaluation in classify_type().
Signed-off-by: Martin Nagy <nagy.martin@gmail.com>
---
parse.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/parse.c b/parse.c
index 9662122..18cfaef 100644
--- a/parse.c
+++ b/parse.c
@@ -924,12 +924,17 @@ static struct token *typeof_specifier(struct token *token, struct decl_state *ct
ctx->ctype.base_type = sym->ctype.base_type;
apply_ctype(token->pos, &sym->ctype, &ctx->ctype);
} else {
- struct symbol *typeof_sym = alloc_symbol(token->pos, SYM_TYPEOF);
- token = parse_expression(token->next, &typeof_sym->initializer);
next prev parent reply other threads:[~2009-04-25 11:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-25 11:03 [PATCH] Print an error if typeof() lacks an argument Martin Nagy
2009-04-25 11:11 ` Martin Nagy [this message]
2009-04-27 6:38 ` Christopher Li
2009-04-27 9:15 ` Martin Nagy
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=20090425131117.30242d75@notas \
--to=nagy.martin@gmail.com \
--cc=linux-sparse@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.