Skip to content

Fix SIGABRT (free(): invalid pointer) at OpenFrescoPy shutdown#14

Open
joecga4 wants to merge 1 commit into
aschellenberg74:masterfrom
joecga4:fix/openfrescopy-shutdown-sigabrt
Open

Fix SIGABRT (free(): invalid pointer) at OpenFrescoPy shutdown#14
joecga4 wants to merge 1 commit into
aschellenberg74:masterfrom
joecga4:fix/openfrescopy-shutdown-sigabrt

Conversation

@joecga4

@joecga4 joecga4 commented Jul 6, 2026

Copy link
Copy Markdown

Importing OpenFrescoPy and exiting the interpreter aborted with free(): invalid pointer during finalization. Fix in PythonInterpreter.cpp — details in the commit. Reproduced and verified on Linux (python3 -c "import OpenFrescoPy"), and the loadPackage integration tests exit cleanly with the fix.

🤖 Generated with Claude Code

cleanupFunc() (registered via Py_AtExit) called C++ `delete pymodule` on a
PyObject* created by PyModule_Create. That PyObject is owned and ref-counted by
Python and allocated with Python's own allocator, so freeing it with the system
allocator aborted with 'free(): invalid pointer' on every `import OpenFrescoPy`
at interpreter finalization. Python releases the module itself during shutdown;
removing the bogus delete (matching OpenSees's cleanupFunc) makes import exit
cleanly. Affects only the importable module path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant