Re: Assertion `idx >= 0 && idx < num_fields ()' failed.

[email protected]
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
> 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" <[email protected]> wrote:

> 
> On 11/23/23 07:11, [email protected] 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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.