#274 closed defect (fixed)
Try to access a no declare variable causes TOL to break down
Reported by: | César Pérez Álvarez | Owned by: | danirus |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | Various | Version: | head |
Severity: | major | Keywords: | |
Cc: |
Description
If we try this code
Text ExtractElement(Set set)
{ Text set[1] };
Text element = ExtractElement(SetOfText("jkj"));
TOL breaks down, i proved with
Text ExtractElement(Set set)
{ set[1] };
and using other construction in call function
Text ExtractElement(EvalSet(SetOfText("jkj", "kjkj"), ToName));
for example, and all work wrong.
But the most curiosly is the fact that if we declare a variable before like this:
Text ExtractElement(Set set)
{ set[1] };
Set reg = EvalSet(SetOfText("jkj", "kjkj"), ToName);
Text ExtractElement(reg);
It works perfectly.
Change History (3)
comment:1 Changed 20 years ago by
Status: | new → assigned |
---|
comment:2 Changed 20 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000274 |
---|
This is a memory management error.
Has been just resolved and fixed in the CVS.
Tol has a problem with Memory Management, in every place and in many design
aspects. Briefly, in three places:
1- In Tol object allocation (where DESTROY macro is masively used),
2- In Types Implementation (duplicates each object representation),
3- In attributes of BSyntaxObject (inner to object representation)
By the way this specific error has been resolved, but let see in the future.