Share

Ficl - small systems scripting with OO

Tracker: Bugs

5 Bug in cleanup code after exit - ID: 1670044
Last Update: Tracker Item Submitted ( lucvdv )

I downloaded ficl-all 4.0.31 yesterday, and included it in an embedded
project (ARM7 based) I'm working at.

Basically, a system and VM are created when a TCP connection comes in at a
certain port. At then end of the session (port closed remotely or user
exits by 'bye'), the VM and system are destroyed again.

Now this turns out to work only once. When FiclSystemCreate(NULL) is
called a second time after a previous system has been destroyed by
ficlSystemDestroy, the whoe device crashes - either because of a stack
overflow or because it runs out of memory (there's 8M of RANM with less
than half used).

I haven't searched in full detail yet, but I think this snippet may be
related: at the end of ficlSystemDestroy in system.c, you can read:

ficlFree(system);
system = NULL;

if (ficlSystemGlobal == system)
ficlSystemGlobal = NULL;

That IF will probably never evaluate to true.

I haven't tested yet if changing the order (moving the 'system = NULL;"
toward the end) solves my problem, but at least this _looks_ like a bug.


Luc Van der Veken ( lucvdv ) - 2007-02-27 14:38

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.