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 20 years ago

Closed 20 years ago

Last modified 18 years ago

#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 danirus

Status: newassigned

comment:2 Changed 20 years ago by danirus

Resolution: fixed
Status: assignedclosed

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.

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

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000274
Note: See TracTickets for help on using tickets.