Open septag opened 6 years ago
That callstack doesn't make sense.
Issue getting fixed by removing cache line alignment also makes no sense.
You'll have to investigate more and provide more info about it.
It doesn't make sense to me either, there is no pointers to unaligned memory and the compiler should take care of it automatically. I just don't seem to understand it and caused me headaches to trace it. The problem also arises only in release build (-Os), which I can't debug easily. seems like it happens when it tries to write to some RenderDraw variable on RenderDraw::clear I'll try to investigate more and get back to you ...
I get SIGBUS crashes on old android hardware (nexus 7 2012 - Arm cortex-a9), newer hardware works fine, I guess older arm CPUs don't have un-aligned access support in hardware so it raises SIGBUS.
here's the callstack:
I have checked RenderDraw structure, and re-ordered the variables and inserted padding, but still I got sigbus on random runs. finally what fixed it was removing the cache line alignment from the structure declaration and the crashes are gone.
I can't seem to understand what caused the problem, as I guess I lack enough knowledge on this matter, can you figure out what was the problem ?
FYI compiling with NDK + clang (v5.0.300080) compile flags:
thanks