public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/32618] New: internal-error: gdb_display_match_list: Assertion `len <= max_completions' failed.
@ 2025-01-30 1:13 wuzy01 at qq dot com
2025-02-02 16:35 ` [Bug gdb/32618] " aburgess at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: wuzy01 at qq dot com @ 2025-01-30 1:13 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=32618
Bug ID: 32618
Summary: internal-error: gdb_display_match_list: Assertion `len
<= max_completions' failed.
Product: gdb
Version: 15.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: wuzy01 at qq dot com
Target Milestone: ---
https://github.com/davidhalter/jedi/issues/2046
```python
$ gdb -ex python-interactive
>>> from jedi.utils import setup_readline
>>> setup_readline()
>>> import <TAB>
../../gdb/completer.c:2919: internal-error: gdb_display_match_list: Assertion
`len <= max_completions' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x569b52 _Z22gdb_internal_backtracev
0xa5dc54 _ZL17internal_vproblemP16internal_problemPKciS2_P13__va_list_tag
0xa5e03a _Z15internal_verrorPKciS0_P13__va_list_tag
0xfbbdce _Z18internal_error_locPKciS0_z
0x5d570e _Z22gdb_display_match_listPPciiPK20match_list_displayer
0x59878f _Z22cli_display_match_listPPcii
0x7fee16269f2d rl_complete_internal
0x7fee1625e447 _rl_dispatch_subseq
0x7fee1625eb1a readline_internal_char
0x7fee1627db24 rl_callback_read_char
0x7fee127ec94c call_readline
0x7fee1595b08d PyOS_Readline
0x7fee1595b399 tok_nextc
0x7fee1595ca97 tok_get_normal_mode
0x7fee15b8af54 _PyPegen_fill_token
0x7fee15c00097 _PyPegen_parse
0x7fee1595ed1b _PyPegen_run_parser
0x7fee15a2c653 _PyPegen_run_parser_from_file_pointer
0x7fee15ba5669 PyRun_InteractiveOneObjectEx
0x7fee15c18925 _PyRun_InteractiveLoopObject
0x7fee15c18d8e PyRun_InteractiveLoopFlags
0x8aae03 _ZL26python_interactive_commandPKci
0x5a3d7c _Z8cmd_funcP16cmd_list_elementPKci
0xa16a2f _Z15execute_commandPKci
0x7a1ae7 _ZL20catch_command_errorsPFvPKciES0_ib
0x7a1bc4 _ZL15execute_cmdargsPKSt6vectorI6cmdargSaIS0_EE11cmdarg_kindS5_Pi
0x7a4155 _ZL15captured_main_1P18captured_main_args
0x7a4e9a _Z8gdb_mainP18captured_main_args
0x466cf5 main
---------------------
This is a bug, please report it. For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.
```
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug gdb/32618] internal-error: gdb_display_match_list: Assertion `len <= max_completions' failed.
2025-01-30 1:13 [Bug gdb/32618] New: internal-error: gdb_display_match_list: Assertion `len <= max_completions' failed wuzy01 at qq dot com
@ 2025-02-02 16:35 ` aburgess at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: aburgess at redhat dot com @ 2025-02-02 16:35 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=32618
Andrew Burgess <aburgess at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aburgess at redhat dot com
--- Comment #1 from Andrew Burgess <aburgess at redhat dot com> ---
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 readline, 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 readline
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 vanilla
state, disconnecting all of GDB's internal functions, etc, then when we leave
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 trying
to call readline to display the completions, but if the Python library actually
changes any of the readline settings then this would really break GDB...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-02 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-30 1:13 [Bug gdb/32618] New: internal-error: gdb_display_match_list: Assertion `len <= max_completions' failed wuzy01 at qq dot com
2025-02-02 16:35 ` [Bug gdb/32618] " aburgess at redhat dot com
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).