Linaro GCC vs Valgrind

2016-06-09 Thread William Mills
Hello, We have been using Linaro GCC 5.x[1] and valgrind. When the optimizer is turned on valgrind complains about writes beyond the current stack pointer. With the optimizer off, the problem report goes away. I have my own conclusion about what is going on but I won't bias you with it. Here a

Re: Linaro GCC vs Valgrind

2016-06-09 Thread Jim Wilson
On Thu, Jun 9, 2016 at 2:22 PM, William Mills wrote: > When the optimizer is turned on valgrind complains about writes beyond > the current stack pointer. With the optimizer off, the problem report > goes away. > 000102f8 : >102f8: e351cmp r0, #1 >102fc: da000

Re: Linaro GCC vs Valgrind

2016-06-09 Thread Charles Baylis
This looks like a valgrind bug to me. I can reproduce the problem with this simple program, which shows the issue at any optimisation level. int main () { asm volatile ("" : : : "r4", "r5"); return 0; } [on my raspberry pi, with the system gcc] $ gcc test.c -mtune=cortex-a15 -marm $ valgrind .