This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr
- From: "mark at klomp dot org" <sourceware-bugzilla at sourceware dot org>
- To: elfutils-devel at sourceware dot org
- Date: Mon, 03 Apr 2017 15:07:06 +0000
- Subject: [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr
- Auto-submitted: auto-generated
- References: <bug-21315-10460@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21315
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
Note that in some cases elfutils deliberately does unaligned accesses if it
believes it is safe. See the following in lib/eu-config.h:
/* Define ALLOW_UNALIGNED if the architecture allows operations on
unaligned memory locations. */
#define SANITIZE_UNDEFINED 1
#if (defined __i386__ || defined __x86_64__) && ! CHECK_UNDEFINED
# define ALLOW_UNALIGNED 1
#else
# define ALLOW_UNALIGNED 0
#endif
Note that it is to not allow unaligned accesses when configuring with
--enable-sanitize-undefined (which adds -fsanitize=undefined
-fno-sanitize-recover to CFLAGS and CXXFLAGS).
Are you configuring using --enable-sanitize-undefined? Or adding
-fsanitize=undefined by hand? In the later case you should also add
-DCHECK_UNDEFINED=1
--
You are receiving this mail because:
You are on the CC list for the bug.