From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 51DD73858033; Thu, 10 Nov 2022 18:41:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51DD73858033 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668105716; bh=lS2BBBp38jVCab7etiiWjxp0WyFfOcrTem4eo0XG4+I=; h=From:To:Subject:Date:From; b=V4mx0D2Ip0JZ97tRpx4+DgGTrvGR9+9/1HZn4J2Numjs1rSBYV4oeGkf9bRpiOsry 4ty3ERSZwt+VD5xdg/9CC8lypxU94kutfu9CshhaxbbVaKVGnGmNro+2NgR5AvSxXJ yhCzH9dp+hXD7og4PCQF6xORbo93kIPBSEZbk8cY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: igen: fix hang when decoding boolean rule constants X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 16cceb84be19a46c0f25cf96aeeea808420a4b70 X-Git-Newrev: ef7c5fd15dbe0937a2b5c729d88263beec507b42 Message-Id: <20221110184156.51DD73858033@sourceware.org> Date: Thu, 10 Nov 2022 18:41:55 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Def7c5fd15dbe= 0937a2b5c729d88263beec507b42 commit ef7c5fd15dbe0937a2b5c729d88263beec507b42 Author: Mike Frysinger Date: Fri Nov 11 01:35:42 2022 +0700 sim: igen: fix hang when decoding boolean rule constants =20 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. Diff: --- 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 d1c90463ca3..51bb3e0b0a3 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 =3D skip_to_separator (chp, ","); + if (*chp =3D=3D ',') + ++chp; chp =3D skip_spaces (chp); } }