https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67246
--- Comment #10 from Jeff Hansen ---
So you're recommending that we add __attribute__((packed)) to the struct?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67246
Jeff Hansen changed:
What|Removed |Added
CC||sqrammi at hotmail dot com
--- Comment #8
--- Comment #12 from sqrammi at hotmail dot com 2007-01-26 21:10 ---
This was confirmed to be a problem with alignment fixup in the kernel.
Do an 'echo 2 > /proc/cpu/alignment' and misaligned accesses are fixed up, and
this problem goes away. Misaligned accesses shoul
--- Comment #11 from sqrammi at hotmail dot com 2007-01-25 18:01 ---
Thinking about it some more, this actually may be a bug in my Linux kernel
configuration that fixes up unaligned accesses. It's probably trying to fix up
for a big-endian system on my little-endian s
--- Comment #10 from sqrammi at hotmail dot com 2007-01-25 17:55 ---
Great. That's perfect.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30581
--- Comment #8 from sqrammi at hotmail dot com 2007-01-25 17:45 ---
It would be easy to add support to the compiler to at least warn about char
arrays of non-CPU-word-size length being placed on the stack, right? It
wouldn't even have to be a warning that shows up unless -Wall (or
--- Comment #6 from sqrammi at hotmail dot com 2007-01-25 17:28 ---
The problem is that the compiler is not either 1) automatically aligning the
buffer so that the program actually works or 2) warning the user that their
code is retarded and needs to be modified so that all the stacks
--- Comment #4 from sqrammi at hotmail dot com 2007-01-25 17:12 ---
Created an attachment (id=12956)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12956&action=view)
Modified code - no warnings
--
sqrammi at hotmail dot com changed:
What|
--- Comment #3 from sqrammi at hotmail dot com 2007-01-25 17:11 ---
I've modified the source so that there are no warnings and (hopefully) no
aliasing violations. The problem still occurs. Here is my line that I use to
compile:
arm-926ejs-linux-gnu-gcc -Wall -O2 -fno-strict-ali
--- Comment #1 from sqrammi at hotmail dot com 2007-01-24 23:44 ---
Created an attachment (id=12953)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12953&action=view)
Source file to produce this bug
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30581
UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sqrammi at hotmail dot com
GCC build triplet: arm-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: arm-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30581
11 matches
Mail list logo