Repository navigation
test(vision_mixer): register the cudadownload stand-in once, never remove it - #950
Merged
Merged
Conversation
…move it vision_mixer_cuda_input_test crashed in about one run in four (11 of 40 locally, and on CI in PR #949) with an ElementFactory instance_of assertion or a segfault. Each test registered a stand-in cudadownload and removed it from the registry afterwards, so the missing-adapter test could see it absent. Registry::remove_feature frees the factory while the element class keeps a plain pointer to it, so the next registration or lookup under that name read freed memory; the lock between the tests did not help. The stand-in is now registered once per process and never removed, and the missing-adapter test moves to its own binary, vision_mixer_cuda_missing_test, where nothing is registered. The shared Media Player -> Vision Mixer harness moves to tests/vision_mixer_cuda/. The test bodies are unchanged. 40 of 40 runs of each binary pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
2 of 5 tasks
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.
Description
vision_mixer_cuda_input_test(from #948) crashed in about one run in four: 11 of 40 runs locally, and it took down CI on #949. The failure was anElementFactoryinstance_ofassertion or a segfault. The bug is in the test, not in the input front.Cause: each test registered a stand-in
cudadownloadand removed it from the registry again, so that the missing-adapter test could find it absent.Registry::remove_featurefrees the factory while the element class keeps a plain, non-refcounted pointer to it. The next registration or lookup under that name then read freed memory. The lock between the tests did not prevent this.Fix:
vision_mixer_cuda_missing_test, so nothing is registered in its process.backend/tests/vision_mixer_cuda/.Type of Change
Testing
vision_mixer_cuda_input_testfailed locally (macOS).vision_mixer_cuda_input_test(2 tests) and 40 of 40 ofvision_mixer_cuda_missing_test(1 test, no skip) pass.cargo clippy --all-targets -- -D warningsandcargo fmtare clean.🤖 Generated with Claude Code