From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 619163858D38; Sun, 2 Feb 2025 16:35:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 619163858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1738514105; bh=d6GqkTHBqHhrDcKC2xazSHxKNaq9d0UpO/PWJr36pXE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pSIIiTz3cZoUOn7XAglYRotOh5UtXhQTsi4/vBtgMGeh8I9juBEh+2eXvyvN8edkz Nu00nuXov+9Um8H/WCeGCbB0Z8Ahnnz2sAmI8mmTkr9MgTsEyX4hXqcUeUqbSN8Ecp atBM3LkL0IGR4kWp8ixbGEftHgLOiqyvTEGwD5no= From: "aburgess at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/32618] internal-error: gdb_display_match_list: Assertion `len <= max_completions' failed. Date: Sun, 02 Feb 2025 16:35:04 +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: 15.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aburgess at redhat dot com X-Bugzilla-Status: UNCONFIRMED 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: cc 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D32618 Andrew Burgess changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aburgess at redhat dot com --- Comment #1 from Andrew Burgess --- The setup_readline() causes the readline shared library to be loaded. If you're using a version of GDB that dynamically links the system readline, then the setup_readline() call will reuse the version of readline that is already loaded. For me though, on my development build, using the statically linked readlin= e, I actually end up with two copies of readline, the statically linked internal version, and the dynamically linked shared library. In this situation, the test works just fine. The dynamically linked readli= ne was never configured to use GDB's internal completion callbacks, so the max-completions checks/asserts are not present. If, however, you are using a GDB that dynamically links with the system readline (like many distro builds of GDB), then the readline shared library will be configured to callback into GDB to display the completions, and so will expect the max-completions settings to be honoured. We could imagine that when we enter Python we restore readline to its vanil= la state, disconnecting all of GDB's internal functions, etc, then when we lea= ve Python we'll need to restore GDB's settings. Actually, when we leave Python, we'd need to save the current state, and restore _that_ when we re-enter Python. Right now, the Python code is tryi= ng to call readline to display the completions, but if the Python library actu= ally changes any of the readline settings then this would really break GDB... --=20 You are receiving this mail because: You are on the CC list for the bug.=