Conversation
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.
vmaf_thread_pool_create()ignorespthread_create()errors, detaches an uninitialized thread handle after a failure, and still reports success with the requested worker count. Destruction can then wait forever for workers that were never started.Check the creation result, set the worker count under the queue lock to the number actually started, stop and release those workers, clear the output pointer, and return the negative pthread error. Also clear the output pointer after the worker-array allocation fails, since that path has already freed the pool. Successful creation is unchanged; this does not introduce a partially sized successful pool.
The regression injects
EAGAINat the first and secondpthread_create()calls andENOMEMat the worker-array allocation. It checks the error, null output, no detach of an uncreated worker, and a successful retry with a real queued job. Each case fails independently against the original implementation. The new test has a ten-second timeout so a teardown regression is bounded.Validation against upstream
f85a853692a8c730d0270cd733c8bb30b5b93b7c, x86-64 Linux, GCC 15.2.0, Meson 1.10.1:No scoring code or golden-data assertions changed. Sanitizer acceptance here is for the two thread-pool targets; separate baseline leaks in upstream
test_predictandtest_pic_preallocationremain outside this patch. This fixes construction failure cleanup; callers must still coordinate ordinary pool lifetime with their producers.