Skip to content

avoid ReadUnaligned on long, ulong, double in Android device - #795

Merged
AArnott merged 2 commits into
masterfrom
android-armv7-32bit
Jan 30, 2020
Merged

AArnott merged 2 commits into
masterfrom
android-armv7-32bit

Conversation

@neuecc

@neuecc neuecc commented Jan 29, 2020

Copy link
Copy Markdown
Member

@Durnev @AArnott @odysoftware
reported at #748, crash in Android 32bit device at ReadUnaligned<long>.
This code hook when called TryRead<long>, use custom convert method instead of ReadUnaligned.
Hook to long is also called by ulong and double.

I have encountered a similar memory alignment problem while creating another serializer (ZeroFormatter) before.
I think this is the same problem, so I think this will solve it.

@neuecc
neuecc requested a review from AArnott January 29, 2020 03:33
@neuecc neuecc changed the title avoid ReadUnaligned on long, ulong, double in Android device avoid ReadUnaligned on long, ulong, double in Android 32bit device Jan 29, 2020
@neuecc neuecc changed the title avoid ReadUnaligned on long, ulong, double in Android 32bit device avoid ReadUnaligned on long, ulong, double in Android device Jan 29, 2020

@AArnott AArnott left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. But we should also file a bug against Unity/mono to get their problem fixed as well.
I had luck with the bug I filed against mono recently: they just fixed the memory overlap bug I filed a week or two ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants