New GDB 7.5.x release sometime next week?
Mike Frysinger
vapier@gentoo.org
Tue Nov 27 20:45:00 GMT 2012
On Tuesday 27 November 2012 15:29:13 Joel Brobecker wrote:
> > how about this in libiberty/:
> > 2012-07-31 Mike Frysinger <vapier@gentoo.org>
> >
> > * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output
> > to swap_bytes, and then call memcpy to move it to ctx->buffer.
>
> As always, a quick explanation of what it fixes, and why it is
> important enough that it should be included in the release would help.
> Just from the ChangeLog entry alone, I am having a difficult time
> evaluating it.
Subject: [PATCH] libiberty/md5: fix strict alias warnings
Current libiberty md5 code triggers these warnings with gcc-4.7.1 for me:
libiberty/md5.c: In function 'md5_finish_ctx':
libiberty/md5.c:117:3: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
libiberty/md5.c:118:3: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
The change below fixes things for me. The optimized output (-O2) is the same
before/after my change on x86_64-linux. I imagine it'll be the same for most
targets. It seems simpler than using a union on the md5_ctx buffer since these
are the only two locations in the code where this occurs.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb/attachments/20121127/f307f2ce/attachment.sig>
More information about the Gdb
mailing list