Bug Report 2001/10/21-v1.0b26-br01


[MAIN]
[News]
[Intro]
[Features]
[Download]
[Installation]
[Support]
[Support+]
[Docu]
[Tutorial]
[Bugs]
[forum ]
[wiki]
[Mirror]
[Authors]
[Future]
[License]
[Win98 Setup Bug]
[Subscribe]
Bug Report id=2001/10/21-v1.0b26-br01
Affected versions:v1.0b26
Severity:Low

Bug Description

ScriptBasic programs using external modules implementing external commands may use excess memory while running the interpreter.

NOTE: This use of excess memory is released when the interpreter finishes program execution, thus this is not a serious memory leak. This bug does not effect severely the memory management of variations of ScriptBasic embedding the interpreter into multi-thread environment.

Bug Reason, What Causes the Bug

When an external command is used the pointer pEo->pGlobalMortalList is set to point to NULL erroneously. This causes all temporary variable allocated in the external command unreleased when the external command returns.

Solution

The function COMMAND_EXTERNAM in file commands/external.c has to be altered from
pEo->pGlobalMortalList = NULL;

to
pEo->pGlobalMortalList = &_ThisCommandMortals;

set the variables correct.

Bug Workaround Until Solution is Available

There is no workaround.

Acknowledgement

Mitchell Greess [m.greess@solutions-atlantic.com] has discovered this bug.

This page was generated January 28, 2010 9:58:43