Bug Report 2002/03/03-v1.0b28-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=2002/03/03-v1.0b28-br01
Affected versions:v1.0b28 and previous versions where REF is available
Severity:Medium

Bug Description

Some BASIC programs using reference variables cause the interpreter to crash. For example the code:
P1 = 3
REF P2 = P1
REF P3 = P2
undef P2
undef P1

causes segmentation fault/access violation.

Bug Reason, What Causes the Bug

The memory management module contains an error that mess up pointers.

Solution

The next release will deliver a corrected version. The modification to the file memory.c needed:


350c350
<   if( p->State == STATE_IMMORTAL && p->link.rprev ){
---
>   if( p->State == STATE_IMMORTAL && p->link.rprev && p->vType != VTYPE_REF){


Bug Workaround Until Solution is Available

Whenever reference variables are released the program should avoid releasing a variable using the command undef, which is a reference itself.

Acknowledgement

N/A

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