Skip to content

Version 1.20260723.1#589

Merged
agarny merged 2 commits into
opencor:mainfrom
agarny:cleaning-up
Jul 23, 2026
Merged

Version 1.20260723.1#589
agarny merged 2 commits into
opencor:mainfrom
agarny:cleaning-up

Conversation

@agarny

@agarny agarny commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 23, 2026 10:43
…e-after-free on instance deletion.

Indeed, the global `sRuntimes` cache shared one JIT-compiled runtime across all `SedInstance` objects for the same CellML file. When an instance was destroyed, the cached runtime's JIT-compiled code still referenced the old thread-local solver address (`sNlaSolverAddress`), which pointed to freed memory on std::async thread-pool reuse. Each instance now creates its own runtime, eliminating the shared-state corruption.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the project version and changes how CellmlFile produces CellmlFileRuntime instances by removing the compiled-runtime cache/cleanup logic in CellmlFile.

Changes:

  • Bump VERSION.txt from 1.20260723.0 to 1.20260723.1.
  • Remove CellmlFile’s explicit destructor and the global runtime cache; CellmlFile::runtime() now always creates a new runtime.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
VERSION.txt Increments the library version string.
src/support/cellml/cellmlfile.h Removes the explicit CellmlFile destructor declaration.
src/support/cellml/cellmlfile.cpp Removes the global runtime cache and returns a freshly created runtime on every call.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/support/cellml/cellmlfile.cpp
Comment thread src/support/cellml/cellmlfile.cpp
@agarny
agarny merged commit dfc2d4c into opencor:main Jul 23, 2026
24 checks passed
@agarny
agarny deleted the cleaning-up branch July 23, 2026 11:03
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