[Scummvm-devel] SCI script error detection

Lars Skovlund lskovlun at image.dk
Thu Oct 7 08:49:02 CEST 2010


On Wed, Oct 06, 2010 at 09:50:34PM +0000, Willem Jan Palenstijn wrote:
> Hi,
> 
> We currently detect the use uninitialized variables by SCI scripts
> automatically at run-time ("sci_valgrind"), and error out when we find any.
> The proper workaround/initialization is then added for each specific case
> manually.
> 
> I think we should maybe change this to warnings for the release version, to
> prevent ones that were missed during testing from seemingly "crashing" ScummVM.
> (We could defaulting to init-to-zero behaviour maybe.)

The behavior before sci_valgrind was introduced was simply to
treat these variables as being zero. Looking over workarounds.cpp,
87.2% of all uninitialized temp reads are still treated by returning
zero when those variables are read, and only the remaining 12.8%
require a different value. So if these statistics generalize, 7 out of
8 yet undiscovered temp read bugs will work with this.

Lars




More information about the Scummvm-devel mailing list