[Scummvm-devel] Re: [Scummvm-cvs-logs] CVS: scummvm configure,1.21,1.22

Lionel Ulmer lionel.ulmer at free.fr
Mon Jun 2 11:35:06 CEST 2003


> Uh OK, didn't know such evil existed :-)

Well, from what I know current Linux kernels on ARM do the right thing and
simply crash.

Now why do 'old one' not crash ? It's easy : some old ARM programs relied on
the fact that reading an UINT16 value at an unaligned memory access did
automagically swap both bytes (so you had a bswap instruction for free).

As now this is frowned upon, the new ARM Linux ABI tells that it will
generate a sigbus.

So this leads to the answer to the next question :

> OK. Would it work if I e.g. init the array to contain all 0xE7 bytes, 
> and then compared to that value?

Nope, as told by Marcus, you need to have different bytes value to really
detect the error condition.

BTW, you can look at the code in common/main.cpp (if it was not removed, I
am looking at an old tree) that does a check at ScummVM start-up.

     Lionel

-- 
		 Lionel Ulmer - http://www.bbrox.org/




More information about the Scummvm-devel mailing list