public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 4/4] sim: igen: fix hang when decoding boolean rule constants
Date: Fri, 11 Nov 2022 01:41:28 +0700	[thread overview]
Message-ID: <20221110184128.18812-4-vapier@gentoo.org> (raw)
In-Reply-To: <20221110184128.18812-1-vapier@gentoo.org>

The parser for boolean rules fails to skip over the , separator in
the options which makes it hang forever.  No dc files in the tree
use boolean rules atm which is why no one noticed.
---
 sim/igen/ld-decode.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sim/igen/ld-decode.c b/sim/igen/ld-decode.c
index d1c90463ca3c..51bb3e0b0a37 100644
--- a/sim/igen/ld-decode.c
+++ b/sim/igen/ld-decode.c
@@ -131,6 +131,8 @@ load_decode_table (const char *file_name)
 		  break;
 		}
 	      chp = skip_to_separator (chp, ",");
+	      if (*chp == ',')
+		++chp;
 	      chp = skip_spaces (chp);
 	    }
 	}
-- 
2.38.1


      parent reply	other threads:[~2022-11-10 18:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 18:41 [PATCH 1/4] sim: igen: constify various func arguments Mike Frysinger
2022-11-10 18:41 ` [PATCH 2/4] sim: igen: mark output funcs with printf attribute Mike Frysinger
2022-11-10 18:41 ` [PATCH 3/4] sim: igen: mark error func as noreturn since it exits Mike Frysinger
2022-11-10 18:41 ` Mike Frysinger [this message]

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=20221110184128.18812-4-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).