Repository navigation
Take the dummy handle limit from the atomic's value type - #133
Merged
Merged
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.
std::numeric_limitshas no specialization forstd::atomic, sostd::numeric_limits<std::atomic_unsigned_lock_free>::max()is the primary template's value-initializedT(), which is zero.dummy_count < 0is never true, so every failed delay load skips the dummy handle and logs the pool as exhausted:It works anyway on x86 and x64, because returning handle 1 still leads to
dliFailGetProc, where the stubs are matched by DLL name. So the only visible effect is a warning on every machine without a given screen reader, and the dummy handles never being used.What this does
Asks
numeric_limitsaboutstd::atomic_unsigned_lock_free::value_typeinstead, in both the comparison and the log message.Testing
Built shared for x64 with MSVC and ran a context with an availability callback on a machine without PC-Talker, under
PRISM_LOG=debug. Before:After: