From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF6743894C25; Wed, 7 Apr 2021 02:51:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF6743894C25 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/27681] FAIL: gdb.base/help.exp: apropos \(print[^[ bsiedf\".-]\) (timeout) Date: Wed, 07 Apr 2021 02:51:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2021 02:51:56 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27681 --- Comment #19 from Tom Tromey --- (In reply to Michael Matz from comment #18) > The types are simply incompatible: > [...] This has existed for a very long time in gdb. compiled_regex (commit 2d7cc5c797) didn't even introduce it, it existed in apropos_command + apropos_cmd before that. I suspect the answer is that gdb was originally written to assume the libiberty regex implementation. xregex.h redefines the various symbols and then xregex2.h says: typedef struct re_pattern_buffer regex_t; I suppose the bug then is from this code in gdb_regex.h: #ifdef USE_INCLUDED_REGEX # include "xregex.h" #else commit 8898755195db Date: Tue Apr 4 02:08:52 2000 +0000 So still pretty darn old. I wonder whether we should just switch this back off and rely on libiberty. The main benefit here would be that we have some code that would be improved if it could use a regex that didn't rely on a \0-terminated buffer, namely the output functions that strip or apply styles. Currently these have to allocate sometimes to ensure their input is correctly terminated. Anyway, I think the GNU implementations already handle this, for their Emacs support. OTOH maybe that's niche and we should just fix the bug directly. I didn't research to see why that patch was written in the first place. --=20 You are receiving this mail because: You are on the CC list for the bug.=