* [RFC] infinite loop in free_preprocessor_line()
@ 2007-05-26 0:24 Alexey Dobriyan
2007-05-27 0:35 ` Josh Triplett
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2007-05-26 0:24 UTC (permalink / raw)
To: linux-sparse
While running if-2.c from gcc testsuite sparse goes into infinite loop in
free_preprocessor_line().
Trimmed down test-case is
#if 1
#if
(two lines)
--- a/pre-process.c
+++ b/pre-process.c
@@ -763,11 +763,11 @@ out:
static int free_preprocessor_line(struct token *token)
{
- do {
+ while (token_type(token) != TOKEN_EOF) {
struct token *free = token;
token = token->next;
__free_token(free);
- } while (token_type(token) != TOKEN_EOF);
+ };
return 1;
}
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [RFC] infinite loop in free_preprocessor_line()
2007-05-26 0:24 [RFC] infinite loop in free_preprocessor_line() Alexey Dobriyan
@ 2007-05-27 0:35 ` Josh Triplett
2007-06-02 21:55 ` Alexey Dobriyan
0 siblings, 1 reply; 4+ messages in thread
From: Josh Triplett @ 2007-05-27 0:35 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: linux-sparse
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
Alexey Dobriyan wrote:
> While running if-2.c from gcc testsuite sparse goes into infinite loop in
> free_preprocessor_line().
>
> Trimmed down test-case is
>
> #if 1
> #if
>
> (two lines)
Thanks for this fix.
Can I get a Signed-off-by for this patch, please?
- Josh Triplett
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] infinite loop in free_preprocessor_line()
2007-05-27 0:35 ` Josh Triplett
@ 2007-06-02 21:55 ` Alexey Dobriyan
2007-06-03 22:27 ` Josh Triplett
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2007-06-02 21:55 UTC (permalink / raw)
To: Josh Triplett; +Cc: linux-sparse
On Sat, May 26, 2007 at 05:35:26PM -0700, Josh Triplett wrote:
> Alexey Dobriyan wrote:
> > While running if-2.c from gcc testsuite sparse goes into infinite loop in
> > free_preprocessor_line().
> >
> > Trimmed down test-case is
> >
> > #if 1
> > #if
> >
> > (two lines)
>
> Thanks for this fix.
>
> Can I get a Signed-off-by for this patch, please?
Sorry, lost email in noise
Patch is Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-03 22:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-26 0:24 [RFC] infinite loop in free_preprocessor_line() Alexey Dobriyan
2007-05-27 0:35 ` Josh Triplett
2007-06-02 21:55 ` Alexey Dobriyan
2007-06-03 22:27 ` Josh Triplett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).