The built-in memcpy uses unaligned reads/writes and this crashes my ARM-A5 processor.
Bug #1669879 reported by
Roger W. Cover
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I am using an Atmel SAMA5D35 processor. It is an ARM Cortex-A5. The unaligned reads and writes inserted by the compiler for memcpy() calls are not supported by this processor. The processor experiences a memory access fault as a result.
I have worked around the problem by using the -fno-builtin-memcpy argument on the command line. I wanted to report the problem so it can be fixed, however.
Changed in gcc-arm-embedded: | |
status: | New → Invalid |
To post a comment you must log in.
Hi Roger, can I confirm if you're compiling with the -mno-unaligned- access flag? By default GCC only disallows unaligned memory accesses for pre-ARMv6, all ARMv6-M and for ARMv8-M Baseline architectures, so in the case of your Cortex-A5 it may generate unaligned accesses unless you explicitly disable it.
If the issue persists even with the -mno-unaligned- access flag being specified, we will look into this.