Repository navigation
libobs: Characterize and extract object reference APIs - #4669
Merged
Merged
Conversation
Ci-Attestation: {"at":1794374588,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["4c3d5d1de23b5c92435c407c7c4d012e13c31a26"],"secs":0,"stamp":"23b6171aa2468976d18385d2f6eac1a0","tree":"648147d5ff9103e9952a447b15c3423cc4b8117f","v":1,"via":"run"}
Ci-Attestation: {"at":1794374588,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["4c3d5d1de23b5c92435c407c7c4d012e13c31a26"],"secs":0,"stamp":"f3a45986095526bcf0c8fb7a997d9567","tree":"648147d5ff9103e9952a447b15c3423cc4b8117f","v":1,"via":"run"}
Ci-Attestation: {"at":1794374588,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["4c3d5d1de23b5c92435c407c7c4d012e13c31a26"],"secs":0,"stamp":"f9f07c3c878aa1c07be9b5aa50a7691e","tree":"648147d5ff9103e9952a447b15c3423cc4b8117f","v":1,"via":"run"}
zackees
enabled auto-merge
November 11, 2026 05:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
obs_object_get_refandobs_object_releaseare still inline in the large core implementation and had no focused C characterization. Add a new C cmocka characterization first, then move both complete function bodies verbatim fromlibobs/obs.c.hintolibobs/obs-object-ref.c.h, included alphabetically in the existing core unity group. This is the behavior-neutral prerequisite required by testing-policy.md; the Rust swap is #4668 and waits for this PR to land. Refs #4667.The four C cases call the actual exported APIs with private common-context/control fixtures. They cover source/output/encoder/service/canvas and the invalid type tag: current code uses the common control and stored destroy callback without a type switch. Assertions pin NULL with and without an initialized core; acquisition without a core; the shutdown warning guard before NULL; counts 0/1/7/1023, repeated acquisitions and balanced releases; stored identity distinct from the argument; NULL control; a live control with NULL stored identity still incrementing the strong count; expired counts -1/-2/-3; final callback identity/order; weak-owner decrement and control deallocation. Odd current behavior is characterized, not endorsed. Invalid releases without ownership/control and overflow are excluded.
Characterization commit:
4c3d5d1de. Before and after extraction,test_object_ref, unchangedtest_source_module, and unchangedtest_module_listseach passed three repeats against both actual hybrid and C-reference libraries (18 suite executions per phase, no skips).lddconfirmed the selected library paths; all 1,767 dynamic exports matched in each phase. Both complete definitions are byte-identical and the original core file changes only by removal of their span. All ten build-group checks,soldr cargo fmt --all --check, andgit diff --checkpassed. FullSOLDR_PORCELAIN=0 ./lintpassed exactly once, exit 0 (155.5 s, 1,800-second deadline); matching passing Rust verdicts were reused. The diagnostics wrapper classified the output as unknown; the raw log confirmslane lint: ok.No Rust swap or Rust test executable is introduced. Rust RED/GREEN, Tier 1, and original-C differential Tier 3 belong to #4668. Tier 4 is inapplicable. Native Windows/macOS execution, sanitizer execution, and the full Tier 2 suite were not run locally. No existing C test, public header, WebSocket plugin, workflow, native test graph, or native.rs changes.