[Bug ada/67473] New: init.c undefined behaviour referencing misaligned pointer
zeccav at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Sep 7 04:56:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67473
Bug ID: 67473
Summary: init.c undefined behaviour referencing misaligned
pointer
Product: gcc
Version: 5.2.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: zeccav at gmail dot com
Target Milestone: ---
While running on the testsuite a sanitized version of the ada compiler
I got the following
RUN c52103x
,.,. C52103X ACATS 2.5 15-09-06 20:52:03^M
---- C52103X CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE ASSIGNMENTS,^M
THE LENGTHS MUST MATCH; ALSO CHECK WHETHER^M
CONSTRAINT_ERROR OR STORAGE_ERROR ARE RAISED FOR LARGE^M
ARRAYS.^M
- C52103X NO CONSTRAINT_ERROR FOR TYPE WITH 'LENGTH = INTEGER'LAST + ^M
3.^M
init.c:492:12: runtime error: load of misaligned address 0x00000041871f for
type 'long long unsigned int', which requires 8 byte alignment
0x00000041871f: note: pointer points here
00 10 00 00 48 83 0c 24 00 48 39 cc 75 ef 48 29 d6 48 29 f4 48 83 0c 24 00
48 81 c4 20 10 00 00
^ ^
- C52103X STORAGE_ERROR RAISED WHEN DECLARING TWO PACKED BOOLEAN
ARRAYS WITH INTEGER'LAST + 3 COMPONENTS.
==== C52103X PASSED ============================.
PASS: c52103x
gcc/ada/init.c:492 is
&& ((*pc & 0xffffffffffLL) == 0x00240c8348LL
so it seems that unsigned long *pc is misaligned not being a multiple of eight
I have x86-64
More information about the Gcc-bugs
mailing list