You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All DataView::toX functions directly cast the pointer without taking alignment into account. This unaligned access will only have a performance penalty on x86 CPUs, however, on ARM CPUs this results in a crash due to the unaligned memory access. https://github.com/nem0/OpenFBX/blob/master/src/ofbx.cpp#L304
Copying into a stack variable is one way to remove the unaligned access, not sure if it is the most performant way to fix this.
It's actually undefined behaviour the way it is now. I just did not care and did not expect it to be run on something else than PC HW. memcpy is the best solution, I will fix it soon, but I don't have ARM to test it.
Thank you (and also for the great library). I could also create a quick pull-request if you want? Since I have already made the change in my local repo.
All DataView::toX functions directly cast the pointer without taking alignment into account. This unaligned access will only have a performance penalty on x86 CPUs, however, on ARM CPUs this results in a crash due to the unaligned memory access.
https://github.com/nem0/OpenFBX/blob/master/src/ofbx.cpp#L304
Copying into a stack variable is one way to remove the unaligned access, not sure if it is the most performant way to fix this.
The text was updated successfully, but these errors were encountered: