Skip to content

Fix cross-ring copies and procedure lifetime cleanup - #1381

Open
cxzhong wants to merge 2 commits into
Singular:spielwiesefrom
cxzhong:agent/fix-mpcopy-proc-lifetime
Open

Fix cross-ring copies and procedure lifetime cleanup#1381
cxzhong wants to merge 2 commits into
Singular:spielwiesefrom
cxzhong:agent/fix-mpcopy-proc-lifetime

Conversation

@cxzhong

@cxzhong cxzhong commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reorder matrix polynomial copies when source and destination rings do not share the same polynomial representation, while preserving the compatible fast path.
  • Make procedure destruction safe and transactional while procedures are executing, including nested packages/rings, lists, htables, attributes, assignment, export, reload, examples, and branch calls.
  • Restore normal PROC_CMD attribute cleanup and protect procedure metadata for the full call lifetime.
  • Add focused regressions for procedure ownership/lifetime and cross-term-order mp_Copy, plus compiler-warning cleanups in touched code.

Testing

  • Release and OM_TRACK builds completed successfully.
  • Modified Singular translation units passed -Wall -Wextra -Werror; the standalone library parser passed the same gate.
  • Modified libpolys units passed with warnings-as-errors after excluding two pre-existing header-only categories (unused-parameter and unused-value).
  • make -j2 check passed.
  • libpolys tests: 4/4 passed.
  • proc_lifetime.tst: release 1/1 and OM_TRACK 1/1 passed; generated baseline decoded and passed gzip -t.
  • New.lst: 88/94 passed. The remaining six are environment-dependent failures caused by unavailable optional NTL/FLINT, gfanlib, or external rref support: bug_absprimdec, enumpoints, gfanlib, oscar3905, rref, and testParametrization_2.

Review

Three independent review passes covered mp_Copy, procedure lifetime/reference handling, and the complete release diff. No remaining P1/P2 findings were identified. Repeated list/attribute lifetime tests showed no memory growth.

@cxzhong
cxzhong marked this pull request as ready for review August 6, 2026 05:04
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