* [Bug libelf/21315] New: multiple misaligned address errors
@ 2017-03-27 12:07 ago at gentoo dot org
2017-03-27 12:10 ` [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr ago at gentoo dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ago at gentoo dot org @ 2017-03-27 12:07 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=21315
Bug ID: 21315
Summary: multiple misaligned address errors
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libelf
Assignee: unassigned at sourceware dot org
Reporter: ago at gentoo dot org
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
Created attachment 9947
--> https://sourceware.org/bugzilla/attachment.cgi?id=9947&action=edit
errors
On elfutils-0.168:
# eu-elflint -d $FILE
libelf/elf32_getshdr.c:140:8: runtime error: member access within misaligned
address 0x7fa161766002 for type 'struct Elf64_Shdr', which requires 8 byte
alignment
Compiled with: gcc-6.3.0
Visible with: -fsanitize=undefined
Reproducer:
https://github.com/asarubbo/poc/blob/master/00237-elfutils-misalignedaddress1
Errors attached.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr
2017-03-27 12:07 [Bug libelf/21315] New: multiple misaligned address errors ago at gentoo dot org
@ 2017-03-27 12:10 ` ago at gentoo dot org
2017-04-03 15:07 ` mark at klomp dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ago at gentoo dot org @ 2017-03-27 12:10 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=21315
Agostino Sarubbo <ago at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|multiple misaligned address |multiple misaligned address
|errors |errors for Elf64_Shdr
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr
2017-03-27 12:07 [Bug libelf/21315] New: multiple misaligned address errors ago at gentoo dot org
2017-03-27 12:10 ` [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr ago at gentoo dot org
@ 2017-04-03 15:07 ` mark at klomp dot org
2017-04-03 16:37 ` ago at gentoo dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mark at klomp dot org @ 2017-04-03 15:07 UTC (permalink / raw)
To: elfutils-devel
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr
2017-03-27 12:07 [Bug libelf/21315] New: multiple misaligned address errors ago at gentoo dot org
2017-03-27 12:10 ` [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr ago at gentoo dot org
2017-04-03 15:07 ` mark at klomp dot org
@ 2017-04-03 16:37 ` ago at gentoo dot org
2017-05-24 20:05 ` ago at gentoo dot org
2017-05-24 20:21 ` mark at klomp dot org
4 siblings, 0 replies; 6+ messages in thread
From: ago at gentoo dot org @ 2017-04-03 16:37 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=21315
--- Comment #2 from Agostino Sarubbo <ago at gentoo dot org> ---
(In reply to Mark Wielaard from comment #1)
> 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
It was added by hand..I need to test if I obtain those warning with
--enable-sanitize-undefined
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr
2017-03-27 12:07 [Bug libelf/21315] New: multiple misaligned address errors ago at gentoo dot org
` (2 preceding siblings ...)
2017-04-03 16:37 ` ago at gentoo dot org
@ 2017-05-24 20:05 ` ago at gentoo dot org
2017-05-24 20:21 ` mark at klomp dot org
4 siblings, 0 replies; 6+ messages in thread
From: ago at gentoo dot org @ 2017-05-24 20:05 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=21315
--- Comment #3 from Agostino Sarubbo <ago at gentoo dot org> ---
Mark,
I do not have enough resources to make again my tests. Let's close this an the
other similar report for now, I'll reopen them in the future in case will be
needed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr
2017-03-27 12:07 [Bug libelf/21315] New: multiple misaligned address errors ago at gentoo dot org
` (3 preceding siblings ...)
2017-05-24 20:05 ` ago at gentoo dot org
@ 2017-05-24 20:21 ` mark at klomp dot org
4 siblings, 0 replies; 6+ messages in thread
From: mark at klomp dot org @ 2017-05-24 20:21 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=21315
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |OBSOLETE
--- Comment #4 from Mark Wielaard <mark at klomp dot org> ---
Thanks. Closing for now.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-24 20:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 12:07 [Bug libelf/21315] New: multiple misaligned address errors ago at gentoo dot org
2017-03-27 12:10 ` [Bug libelf/21315] multiple misaligned address errors for Elf64_Shdr ago at gentoo dot org
2017-04-03 15:07 ` mark at klomp dot org
2017-04-03 16:37 ` ago at gentoo dot org
2017-05-24 20:05 ` ago at gentoo dot org
2017-05-24 20:21 ` mark at klomp dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).