Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: mail@simon-woerner.de
To: "Simon Marchi" <simark@simark.ca>, "Tom Tromey" <tom@tromey.com>
Cc: gdb@sourceware.org
Subject: Re: Assertion `idx >= 0 && idx < num_fields ()' failed.
Date: Thu, 23 Nov 2023 16:59:00 +0000	[thread overview]
Message-ID: <3416bc2b089a15a83427f4bf17d4bc9fb7ecdaf1@simon-woerner.de> (raw)
In-Reply-To: <90c85e81-940c-4fff-ba76-5c416934ad23@simark.ca>

> 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
>

      parent reply	other threads:[~2023-11-23 16:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87wmu9hhu5.fsf@tromey.com>
2023-11-21 15:09 ` sourceware.org
2023-11-23 12:11   ` mail
2023-11-23 12:11   ` mail
2023-11-24 16:30     ` Tom Tromey
2023-11-24 20:42       ` Simon Marchi via Gdb
2023-11-23 12:11   ` mail
2023-11-23 16:01     ` Simon Marchi via Gdb
2023-11-23 16:59     ` mail [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3416bc2b089a15a83427f4bf17d4bc9fb7ecdaf1@simon-woerner.de \
    --to=mail@simon-woerner.de \
    --cc=gdb@sourceware.org \
    --cc=simark@simark.ca \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox