Repository navigation
Retry IDNA table allocation after a transient failure - #108
Merged
Merged
Conversation
lemire
approved these changes
Oct 14, 2026
lemire
left a comment
Member
There was a problem hiding this comment.
This is fine but it would probably do nothing in practice. In Node.js, it is likely that an out of memory is just an halt which would be correct.
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.
Mirror of ada-url/ada#1322 (same change to the vendored copy in
src/ada_idna.cpp).ensure_tables()used to store a permanent failure whennew (std::nothrow)could not allocate the table buffer, so every later IDNA call in the process failed even after memory became available.An allocation failure now stores the uninitialized state and returns false, so a later call can take the init slot again. A checksum or inflate mismatch still stores the permanent failure. A thread waiting on a peer that abandoned an allocation returns immediately instead of spinning until the timeout.
Refs ada-url/ada#1305