Skip to content
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

DPIC: reset diffstate_buffer to nullptr after free #278

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

poemonsense
Copy link
Member

DPI-C functions are using the diffstate_buffer to check whether the corresponding data structures have been initialized. However, we are not resetting it to nullptr after free. If the simulation environment is reset manually and restarted, then this pointer will be a dangling pointer and corrupt the next DPI-C calls.

DPI-C functions are using the diffstate_buffer to check whether
the corresponding data structures have been initialized. However,
we are not resetting it to nullptr after free. If the simulation
environment is reset manually and restarted, then this pointer
will be a dangling pointer and corrupt the next DPI-C calls.
@poemonsense poemonsense merged commit 4c5b628 into master Jan 31, 2024
5 checks passed
@poemonsense poemonsense deleted the fix-diffstate-buffer-ptr branch January 31, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants