You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Initialize procedure of a generated session package currently does not assume that the state is uninitialized, in particular it checks if the global session variables are already allocated and frees them in that case (before reallocating them). This is an issue for the new allocator (#629), because in this scheme freeing memory is expressed by assigning the pointer back to the corresponding slot pointer. But this means that we need to know something about this pointer value that is being assigned, or else the assignment could break the memory pool.
Considered Options
O1
The best solution seems to add a precondition to Initialize that assumes the state is Uninitialized. In that case, the cleanup code could be removed. This would also add the same precondition to Run.
Decision Outcome
Only one option was considered.
The text was updated successfully, but these errors were encountered:
We remove the defensive code from Session.Initialize, which
deallocates buffers for global session variables if already
allocated. We add a precondition "Session.Unitialized" to that
procedure to avoid calling it in such situations.
Fixes#788
We remove the defensive code from Session.Initialize, which
deallocates buffers for global session variables if already
allocated. We add a precondition "Session.Unitialized" to that
procedure to avoid calling it in such situations.
Fixes#788
We remove the defensive code from Session.Initialize, which
deallocates buffers for global session variables if already
allocated. We add a precondition "Session.Unitialized" to that
procedure to avoid calling it in such situations.
Fixes#788
Context and Problem Statement
The
Initialize
procedure of a generated session package currently does not assume that the state is uninitialized, in particular it checks if the global session variables are already allocated and frees them in that case (before reallocating them). This is an issue for the new allocator (#629), because in this scheme freeing memory is expressed by assigning the pointer back to the corresponding slot pointer. But this means that we need to know something about this pointer value that is being assigned, or else the assignment could break the memory pool.Considered Options
O1
The best solution seems to add a precondition to
Initialize
that assumes the state isUninitialized
. In that case, the cleanup code could be removed. This would also add the same precondition toRun
.Decision Outcome
Only one option was considered.
The text was updated successfully, but these errors were encountered: