https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67446
Bug ID: 67446 Summary: libiberty sha1.c:324 sanitizer runtime error: load of misaligned address 0x62f00011847e for type 'const sha1_uint32', which requires 4 byte alignment Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Target Milestone: --- While building the Fedora 21 kernel 4.1.6-100 with a sanitized version of ld I got the following sanitizer messages (sha1.c compiled with gcc -fsanitize=undefined) This is sha1.c in libiberty sha1.c:324:11: runtime error: load of misaligned address 0x62f00011847e for type 'const sha1_uint32', which requires 4 byte alignment 0x62f00011847e: note: pointer points here 84 00 00 00 00 00 55 be 1a 00 00 00 48 c7 c7 60 7f c1 82 48 89 e5 e8 7b 03 ed fe 5d c3 66 0f 1f ^ sha1.c:324:11: runtime error: load of misaligned address 0x62f00011847e for type 'const sha1_uint32', which requires 4 byte alignment 0x62f00011847e: note: pointer points here 84 00 00 00 00 00 55 be 1a 00 00 00 48 c7 c7 60 7f c1 82 48 89 e5 e8 7b 03 ed fe 5d c3 66 0f 1f ^ sha1.c:324:11: runtime error: load of misaligned address 0x62f00011847e for type 'const sha1_uint32', which requires 4 byte alignment 0x62f00011847e: note: pointer points here 84 00 00 00 00 00 55 be 1a 00 00 00 48 c7 c7 60 7f c1 82 48 89 e5 e8 7b 03 ed fe 5d c3 66 0f 1f ^ sha1.c:324:11: runtime error: load of misaligned address 0x62f00011847e for type 'const sha1_uint32', which requires 4 byte alignment 0x62f00011847e: note: pointer points here 84 00 00 00 00 00 55 be 1a 00 00 00 48 c7 c7 60 7f c1 82 48 89 e5 e8 7b 03 ed fe 5d c3 66 0f 1f sha1.c:324 is x[t] = SWAP (*words); so it seems that words is not a multiple of four, but it should point to type sha1_uint32 which is four bytes aligned. This is on x86-64 building "LD init/built-in.o" and the command is ld -m elf_x86_64 --build-id -X -o .tmp_vmlinux1 -T ./arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/head.o init/built-in.o --start-group usr/built-in.o arch/x86/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a arch/x86/lib/lib.a lib/built-in.o arch/x86/lib/built-in.o drivers/built-in.o sound/built-in.o firmware/built-in.o arch/x86/pci/built-in.o arch/x86/power/built-in.o arch/x86/video/built-in.o net/built-in.o --end-group