public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: jakub@redhat.com
Cc: dwz@sourceware.org
Subject: Re: [PATCH] Error out on invalid locexpr length
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <5cf3456c-2ec3-6a0e-f280-4f1387166f58@suse.de> (raw)
In-Reply-To: <161a757e-f14d-b801-9d64-73c5b1b2597f@suse.de>

On 07-03-19 12:00, Tom de Vries wrote:
> On 07-03-19 08:12, Tom de Vries wrote:
>> Hi,
>>
>> When invoking dwz with a file containing an invalid locexpr length, we can run
>> into this assertion:
>> ...
>> dwz: dwz.c:1722: read_loclist: Assertion `ptr + len <= endsec' failed.
>> Aborted (core dumped)
>> ...
>>
> 
> To address your questions about origin of test-cases, in this case it's
> dw2-skip-prologue.S (
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S;h=cef6e6df12940744c1bc19c9e76fbeb762f80087;hb=HEAD
> ).
> 
> AFAIU, the invalid dwarf is hand-coded, and fixed by:
> ...
> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> index cef6e6df12..a55699fdc6 100644
> --- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> +++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> @@ -123,7 +123,7 @@
>         .section        .debug_loc
>  loclist:
>         /* Reset the location list base address first.  */
> -       .4byte          -1, 0
> +       PTRBYTE         -1, 0
> 
>         PTRBYTE         func_start, func_end
>         .2byte          2f-1f
> ...
> 

FTR, submitted "[RFC][gdb/testsuite] Fix base address selection entry
encoding in dw2-skip-prologue.S" (
https://sourceware.org/ml/gdb-patches/2019-03/msg00141.html ).

Thanks,
- Tom

      reply	other threads:[~2019-03-07 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  0:00 Tom de Vries
2019-01-01  0:00 ` [committed] " Tom de Vries
2019-01-01  0:00 ` [PATCH] " Tom de Vries
2019-01-01  0:00   ` Tom de Vries [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=5cf3456c-2ec3-6a0e-f280-4f1387166f58@suse.de \
    --to=tdevries@suse.de \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).