* Re: Assertion `idx >= 0 && idx < num_fields ()' failed.
2023-11-21 15:09 ` Assertion `idx >= 0 && idx < num_fields ()' failed sourceware.org
@ 2023-11-23 12:11 ` mail
2023-11-23 12:11 ` mail
2023-11-23 12:11 ` mail
2 siblings, 0 replies; 8+ messages in thread
From: mail @ 2023-11-23 12:11 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb
> Which gdb are you using? I wonder if the problem has already been
> fixed.
I'm using the latest version:
```
$ gdb --version
GNU gdb (GDB) 13.2
[...]
```
The only commit mentioning the assert is from two years ago:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=af5300fe24bf2f4e032d639a5396a16c1762b77b
> I think if you try to make an account, it will give you instructions on
> where to send email to get one made for you.
If I have to jump so many hops to make a simple bug report I might as well not do it.
The ancient project management of GDB is already hard enough.
Regards,
Simon Wörner
November 22, 2023 at 17:29, "Tom Tromey" <tom@tromey.com> wrote:
>
> >
> > sourceware org <sourceware.org@brn.li> writes:
> >
> > When debugging QEMU with a breakpoint at `cpu_handle_exception` GDB crashes:
> > ```
> > hit Breakpoint 1, cpu_handle_exception (cpu=0x5555573a2e00, ret=0x7fffffff99a4) at ../qemu-7.1.0/accel/tcg/cpu-exec.c:647
> > 647 if (cpu->exception_index < 0) {
> > ../../gdb/gdbtypes.h:985: internal-error: field: Assertion `idx >= 0 && idx < num_fields ()' failed.
> > A problem internal to GDB has been detected,
> > further debugging may prove unreliable.
> >
>
> Which gdb are you using? I wonder if the problem has already been
> fixed.
>
> >
> > If you like me to submit bugs using your issue tracker you should make
> > it accessible and allow account registration.
> >
>
> I think if you try to make an account, it will give you instructions on
> where to send email to get one made for you.
>
> Direct account creation had to be disabled due to spam.
>
> Tom
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Assertion `idx >= 0 && idx < num_fields ()' failed.
2023-11-21 15:09 ` Assertion `idx >= 0 && idx < num_fields ()' failed sourceware.org
2023-11-23 12:11 ` mail
@ 2023-11-23 12:11 ` mail
2023-11-24 16:30 ` Tom Tromey
2023-11-23 12:11 ` mail
2 siblings, 1 reply; 8+ messages in thread
From: mail @ 2023-11-23 12:11 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb
> Which gdb are you using? I wonder if the problem has already been
> fixed.
I'm using the latest version:
```
$ gdb --version
GNU gdb (GDB) 13.2
[...]
```
The only commit mentioning the assert is from two years ago:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=af5300fe24bf2f4e032d639a5396a16c1762b77b
> I think if you try to make an account, it will give you instructions on
> where to send email to get one made for you.
If I have to jump so many hops to make a simple bug report I might as well not do it.
The ancient project management of GDB is already hard enough.
Regards,
Simon Wörner
November 22, 2023 at 17:29, "Tom Tromey" <tom@tromey.com> wrote:
>
> >
> > sourceware org <sourceware.org@brn.li> writes:
> >
> > When debugging QEMU with a breakpoint at `cpu_handle_exception` GDB crashes:
> > ```
> > hit Breakpoint 1, cpu_handle_exception (cpu=0x5555573a2e00, ret=0x7fffffff99a4) at ../qemu-7.1.0/accel/tcg/cpu-exec.c:647
> > 647 if (cpu->exception_index < 0) {
> > ../../gdb/gdbtypes.h:985: internal-error: field: Assertion `idx >= 0 && idx < num_fields ()' failed.
> > A problem internal to GDB has been detected,
> > further debugging may prove unreliable.
> >
>
> Which gdb are you using? I wonder if the problem has already been
> fixed.
>
> >
> > If you like me to submit bugs using your issue tracker you should make
> > it accessible and allow account registration.
> >
>
> I think if you try to make an account, it will give you instructions on
> where to send email to get one made for you.
>
> Direct account creation had to be disabled due to spam.
>
> Tom
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Assertion `idx >= 0 && idx < num_fields ()' failed.
2023-11-21 15:09 ` Assertion `idx >= 0 && idx < num_fields ()' failed sourceware.org
2023-11-23 12:11 ` mail
2023-11-23 12:11 ` mail
@ 2023-11-23 12:11 ` mail
2023-11-23 16:01 ` Simon Marchi
2023-11-23 16:59 ` mail
2 siblings, 2 replies; 8+ messages in thread
From: mail @ 2023-11-23 12:11 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb
> Which gdb are you using? I wonder if the problem has already been
> fixed.
I'm using the latest version:
```
$ gdb --version
GNU gdb (GDB) 13.2
[...]
```
The only commit mentioning the assert is from two years ago:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=af5300fe24bf2f4e032d639a5396a16c1762b77b
> I think if you try to make an account, it will give you instructions on
> where to send email to get one made for you.
If I have to jump so many hops to make a simple bug report I might as well not do it.
The ancient project management of GDB is already hard enough.
Regards,
Simon Wörner
November 22, 2023 at 17:29, "Tom Tromey" <tom@tromey.com> wrote:
>
> >
> > sourceware org <sourceware.org@brn.li> writes:
> >
> > When debugging QEMU with a breakpoint at `cpu_handle_exception` GDB crashes:
> > ```
> > hit Breakpoint 1, cpu_handle_exception (cpu=0x5555573a2e00, ret=0x7fffffff99a4) at ../qemu-7.1.0/accel/tcg/cpu-exec.c:647
> > 647 if (cpu->exception_index < 0) {
> > ../../gdb/gdbtypes.h:985: internal-error: field: Assertion `idx >= 0 && idx < num_fields ()' failed.
> > A problem internal to GDB has been detected,
> > further debugging may prove unreliable.
> >
>
> Which gdb are you using? I wonder if the problem has already been
> fixed.
>
> >
> > If you like me to submit bugs using your issue tracker you should make
> > it accessible and allow account registration.
> >
>
> I think if you try to make an account, it will give you instructions on
> where to send email to get one made for you.
>
> Direct account creation had to be disabled due to spam.
>
> Tom
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Assertion `idx >= 0 && idx < num_fields ()' failed.
2023-11-23 12:11 ` mail
@ 2023-11-23 16:01 ` Simon Marchi
2023-11-23 16:59 ` mail
1 sibling, 0 replies; 8+ messages in thread
From: Simon Marchi @ 2023-11-23 16:01 UTC (permalink / raw)
To: mail, Tom Tromey; +Cc: gdb
On 11/23/23 07:11, mail@simon-woerner.de wrote:
>> Which gdb are you using? I wonder if the problem has already been
>> fixed.
>
> I'm using the latest version:
>
> ```
> $ gdb --version
> GNU gdb (GDB) 13.2
> [...]
> ```
Can you give some steps to reproduce, so that someone has a chance to
start debugging the problem? Otherwise, it's virtually impossible to
know what happens.
Simon
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Assertion `idx >= 0 && idx < num_fields ()' failed.
2023-11-23 12:11 ` mail
2023-11-23 16:01 ` Simon Marchi
@ 2023-11-23 16:59 ` mail
1 sibling, 0 replies; 8+ messages in thread
From: mail @ 2023-11-23 16:59 UTC (permalink / raw)
To: Simon Marchi, Tom Tromey; +Cc: gdb
> Can you give some steps to reproduce,
Sure, tested on an Arch Linux but this should work on any recent Linux distribution:
```
# dependencies:
# wget zstd python3 gdb libpixman binutils
# get target binary
wget 'https://pixeldrain.com/u/EAUpLuPj?dl=1' -O prebuilt.tar.zst
tar -xvf prebuilt.tar.zst
# or build from source (requires rust and some dependencies)
git clone https://github.com/fuzzware-fuzzer/hoedur.git
cd hoedur
cargo build --bin hoedur-arm
cd target/debug
# get target input/config file
wget 'https://pixeldrain.com/u/FqoekVRY?dl=1' -O reproducer.corpus.tar.zst
echo 'root: {}' > log.yml
# get gef (not sure which gdb command used by gef triggers the crash)
wget https://github.com/hugsy/gef/raw/2023.08/gef.py
# run reproducer
LD_LIBRARY_PATH=. gdb --nx --args ./hoedur-arm --log-config ./log.yml --import-config ./reproducer.corpus.tar.zst run-corpus ./reproducer.corpus.tar.zst
gdb) start
gdb) b cpu<TAB> # for an unrelated autocomplete crash
gdb) b cpu_handle_exception
gdb) source gef.py
gdb) r # crash after `cpu_handle_exception` breakpoint
```
Regards,
Simon Wörner
November 23, 2023 at 17:01, "Simon Marchi" <simark@simark.ca> wrote:
>
> On 11/23/23 07:11, mail@simon-woerner.de wrote:
>
> >
> > >
> > > Which gdb are you using? I wonder if the problem has already been
> > > fixed.
> > >
> >
> >
> > I'm using the latest version:
> >
> > ```
> > $ gdb --version
> > GNU gdb (GDB) 13.2
> > [...]
> > ```
> >
>
> Can you give some steps to reproduce, so that someone has a chance to
> start debugging the problem? Otherwise, it's virtually impossible to
> know what happens.
>
> Simon
>
^ permalink raw reply [flat|nested] 8+ messages in thread