finalburnneo / FBNeo

FinalBurn Neo - We are Team FBNeo.
http://neo-source.com
Other
881 stars 355 forks source link

v60: prevent unaligned read #1733

Closed barbudreadmon closed 3 months ago

barbudreadmon commented 3 months ago

I have seen some weird reports about segas32 crashing, i think it might be due to the unaligned v60 reads i found in ubsan.

@dinkc64 this commit fixes the warnings and doesn't seem to introduce regressions, what do you think ?

dinkc64 commented 3 months ago

Hmm, can you show me the full reports? Is it only happening on a system which doesn't allow unaligned reads for 16/32 bit accesses?

barbudreadmon commented 3 months ago

There were 2 people on discord who said orunners is crashing on their android device, then another one on reddit who said slipstrm crashes (it turns out it hangs after asking more details but he has yet to tell me his OS). It reminded me of the issue some android users used to have with mslug5, svc and kof2003.

dinkc64 commented 3 months ago

Well, make z a const and have them try it? :)

dinkc64 commented 3 months ago

const in a situation where variable never changes except first assignment sometimes helps with compiler optimization

dinkc64 commented 3 months ago

I mean, you don't have to const it, just merge it and see how it works out?

barbudreadmon commented 3 months ago

After investigation, it turns out it's probably something else :

I'll close this.

dinkc64 commented 3 months ago

@barbudreadmon please see forum pm