-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unaligned access on smart phone #299
Comments
actually YGOMobile is using r15b... |
So it would work without any issue with r15b? |
I didn't compile ygomobile recently, but I think it will work |
try but in fact we should avoid such type punning: Line 102 in f39885a
|
@mercury233 @DailyShana
Do you mean that lower 2 bits of |
Cast to a pointer of different type and then write data via this pointer is undefined behavior in most case. |
Recent ARM architecture (after v6) should support unaligned access to my knowledge; it is just very inefficient. However, unaligned access should indeed be prevented in any cases. |
Tried compile with NDK r15c, but still get SIGBUS. It appears that android disables unaligned memory access by default, and there is no way to enable it in user mode, i.e., without modification (e.g., adding system call) on system kernel. |
Build Environment
Android NDK r21 (armv7)
Description
**::Refresh**
pushes 3 byte in qbuf withBufferIO::WriteInt8
, which is later used byquery_field_card
, and causing SIGBUSpcard->get_infos
sinceqbuf
is casted toint*
and it is not dword aligned.For example,
Adding
1
toqbuf
may be a workaround but it requires modification on code.I am wondering how YGOMobile apps get this work?
The text was updated successfully, but these errors were encountered: