[binutils-gdb] Avoid ubsan complaint in BFD

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Mon Jul 23 14:29:00 GMT 2018


*** TEST RESULTS FOR COMMIT 01bcaf636ad0b1d5fe44a21917ec900af86072a8 ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 01bcaf636ad0b1d5fe44a21917ec900af86072a8

Avoid ubsan complaint in BFD

I built gdb with ubsan and ran the test suite.

One complaint was due to bfd_get_elf_phdrs passing NULL to memcpy.
This patch avoids the complaint.

bfd/ChangeLog
2018-07-23  Tom Tromey  <tom@tromey.com>

	* elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.



More information about the Gdb-testers mailing list