Reentrancy error

Project:GNU Smalltalk
Component:VM
Category:bug
Priority:critical
Assigned:Unassigned
Status:duplicate
Description

In _gst_save_to_file (save.c line 277), there are two hook calls. Unfortunately when they are called from the primitive VMpr_ObjectMemory_snapshot it's not safe:

- The process P1 calls the primitive
- the primitive calls the hooks
- the hooks at the end (in _gst_nvmsg_send) selects another process P3
- leave _gst_save_to_file
- The interpretor is in the primitive code which set the stack on the wrong process.

Possible solution ?

the hooks can be removed from the c side and be called from the smalltalk side. But that doesn't solve the problem because the compiler (maybe others with libgst??) calls Smalltalk code. So using push_jmp_buf (&jb, false, get_active_process ()); could solve the problem.

Gwen

Updates

#1 submitted by Gwenael Casaccio on Fri, 07/01/2011 - 12:34
Status:active» duplicate

User login