tqchen opened a new pull request, #653: URL: https://github.com/apache/tvm-ffi/pull/653
## Rationale The ORCJIT addon currently probes library and registered context symbols while a new JITDylib is empty. Object addition is lazy, so the first function lookup can materialize generated context slots and then run initializers before those slots have been assigned. Generated packed callbacks can therefore observe null context. ## Changes - collect only retained, target-JITDylib-local context addresses during materialization and commit them after Ready, before publishing or draining initializer records - track context and init/fini records per materialization responsibility so failures discard only unsafe records and non-symbol materialization errors propagate - initialize newly retained slots idempotently without resetting valid weak or link-once definitions - drain dependency initializers before callers, retain linked providers transitively, reject link-order cycles, and preserve teardown order - add focused C and C++ tests for empty and incremental materialization, packed callbacks and imports, constructor ordering, weak coalescing, cross-library ownership, provider and function lifetime, and failure classification - bump the addon package to 0.1.1 ## Validation - full GCC C/C++ addon suite: 88 passed, 3 expected skips - C and C++ quick starts - GNU RelWithDebInfo and Clang 22 Release builds - 0.1.1 wheel build, isolated install, and smoke load - applicable pre-commit hooks and diff checks This is a behavior-only addon fix with no public Python or C API change. Consumers should use the exact PR head while unmerged and apache-tvm-ffi-orcjit 0.1.1 or newer after release. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
