-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mystery of destroy flag in MemoryManager::delete_var. #1301
Comments
If there are no ill effects from the change, then the destroy flag will be removed everywhere. |
Is this a related issue possibly? #1037 |
Seems likely to me. |
See new branch:
|
…true. #1301 (#1324) Authored-by: John M. Penn <[email protected]>
I reopened this issue because SIM_splashdown now crashes with a SIGSEGV when attempting to reload a checkpoint. With the change: Side Note: Finding the exact location of the SIGSEGV is difficult for a number of reasons including: the terminal is killed an instant after the SIGSEGV occurs. By instrumenting ICG with messages, Iv'e been able to determine that the problem is occurring when called the integration class destructors. When I configure Trick to NOT use the er7 utils integrators: ./configure --with-llvm=/Users/jpenn1/llvm13 --with-gtest=/usr/local --enable-er7utils=no the problem doesn't happen. |
THE PROBLEM
The purpose of the destroy flag in :
Trick::MemoryManager::delete_var(void* address, bool destroy ),
defined in MemoryManager_delete_var.cpp
is unclear (to both Alex and me). Apparently this is causing problems for some.
In MemoryManager_delete_var.cpp:
If the MemoryManager performed the allocation, using malloc, and the destroy flag is set, then call
io_src_destruct_class( alloc_info )
, otherwise don't.The question is why wouldn't you want to call
io_src_destruct_class
?The only occurrence of a call to delete_var in the MemoryManager, with the destroy set to false is:
MemoryManager_clear_memory.cpp:
THE PLAN
The plan here is to simply change the call in MemoryManager_clear_memory.cpp from:
to
and see what happens.
From there we can better determine what we need to do about this issue.
The text was updated successfully, but these errors were encountered: