close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#580 closed defect (fixed)

crash errors related to decompilation and MakeGlobal

Reported by: Pedro Gea Owned by: Víctor de Buen Remiro
Priority: highest Milestone:
Component: Various Version: 1.1.6
Severity: blocker Keywords:
Cc: Iván Robles, Pedro Gea

Description

I usually find critical errors in TolBase 1.1.6 that make TOL to crash.

They are very difficult to reproduce. But I suppose that
they are related to the incorrect compilation/decompilation of variables.

I think also that there are some problems with the scope or visibility
of the variables.

I have found some examples of this kind of errors.
I hope that they can be useful to identify bugs.

error1.tol _
Just compile
Real { MakeGlobal(Real a = 3); 0 };
Real a;
_

error2.tol _
Compile, decompile and compile again.
Set x = Real a = 1 ?;
NameBlock d = SetToNameBlock(x);
NameBlock d = SetToNameBlock(x);
_

Change History (4)

comment:1 Changed 17 years ago by Víctor de Buen Remiro

Status: newassigned

MakeGlobal is an obsolete and horrible feature of TOL that it is incompatible with NameBlock and with any other try to have a scoped and modular language, and I known no good reason to use it. I forgot mark MakeGlobal as deprecated and add commentaries about these problems, but I will to do it.

Thanks for reporting

comment:2 Changed 17 years ago by Víctor de Buen Remiro

Owner: changed from danirus to Víctor de Buen Remiro
Status: assignednew
Summary: crash errors related to decompilationcrash errors related to decompilation and MakeGlobal

comment:3 Changed 17 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: newclosed

Problem in error1.tol has been fixed in CVS for both 1.1.6 and head releases.

Observing TOL code

Real { Real a = 3; 0 };

is obvious that local object a should be deleted when 0 is returned to global scope. Due to some old memory leaks in 1.1.5 and older releases, local globalized items as MakeGlobal(Real a = 3) could surlive to this situations. Once these memory leaks have been fixed, it is needed to reference them in a list owned by its global source file to be able to delete them just when the file is decompiled.

Problem in error2.tol has been fixed in CVS just for head release, due to NameBlock was an experimental issue in 1.1.6 and there are too changes in head in order to explore it.

Thanks for reporting

comment:4 Changed 17 years ago by Víctor de Buen Remiro

Cc: Iván Robles added

* Bug 594 has been marked as a duplicate of this bug. *

Note: See TracTickets for help on using tickets.