[Scummvm-devel] ScummVM 0.13.1. Ports are ready? PalmOS, PS2, NDS

Max Horn max at quendi.de
Wed Mar 25 11:11:45 CET 2009

Hi Max, all,

Am 24.03.2009 um 15:56 schrieb sunmax at libero.it:

> Hi there Sev,
> PS2 port was ready immediately after 0.13.0 was out.


> Now, the stack corruption (which luckily only shows with COMI
> and I tested quite a few games!) is unluckily still there.
> It could be misgenerated binary code out of the new hashmap,
> cause the PS2 dev vintage cross-compiler ICEs when trying to
> compile some of that. Not sure. Just a hunch.

Seems rather unlikely, but sure, can't hurt.

The change where the constructor of _defaultVal is not called BTW is  
in theory not without risk, too, but the only thing it should affect  
is this: Whenever one uses a HashMap with a plain data type (int,  
char, a pointer, ...) as type for the *VALUES*, and one then tries to  
read the value associated to a key which is NOT in the hashmap, *then*  
getVal() and operator[] may return a random value (namely, that of the  
uninited _defaultVal), instead of the "default" value for that type  
(e.g. 0).

This is a very specific and rare situation, however. Unlikely to be  
triggered anywhere. But you can test that easily: Just look for the  
code in HashMap::getVal (line 487) where it returns _defaultVal; set a  
breakpoint there (if you have gdb -- you could run this test on a  
desktop machine, too, of course, or insert an error() / assert call.  
This way, you'll easily find out if this happens prior to your stack  

> Is there any chance Max (the good one: Horn) could hack a
> quick patch so that we can try the older hashmap in 0.13.x ?

Just copy the hashmap.h/.cpp from 0.12.x. The only change you have to  
make: MemoryPool::malloc was renamed to allocChunk, and free to  


More information about the Scummvm-devel mailing list