This is the mail archive of the
mailing list for the elfutils project.
Re: incorrect signed data
- From: Josh Stone <jistone at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 04 Feb 2014 15:12:52 -0800
- Subject: Re: incorrect signed data
On 02/04/2014 02:27 PM, Roland McGrath wrote:
> I think you're right on both counts, but I haven't delved into the
> potential weirdness from changing sign-extension behavior.
Yeah, it's potentially nasty.
There are only a few internal dwarf_formsdata calls: for the decls as I
mentioned, and in array_size() for DW_AT_lower/upper_bound. AFAICS the
spec doesn't explicitly call bounds signed or unsigned, but only
unsigned makes sense to me, so these also ought to use dwarf_formudata.
I don't know what to say about external callers... :/
On 02/04/2014 02:00 PM, Josh Stone wrote:
> So libdw's dwarf_formsdata reads 0xb5 as 179.
Also, this isn't broken math, I just crossed my eyes somewhere.
Really libdw reads data1 0xb5 as 181.