Repository navigation
crypto: the memory option as built - #19
Merged
Merged
Conversation
This was referenced Nov 18, 2026
Merged
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.
What the option does
webcpp::crypto's OpenSSL memory option routes every allocation OpenSSL makes in the process through astd::pmrmemory resource that the program chooses, by installing three adapter functions withCRYPTO_set_mem_functions(install_memory_functions(), called first inmain). It is native only: it is refused on all WebAssembly targets (Emscripten, WASIp2, WASIp3) with a diagnostic naming the target.This PR carries the proposals text as built: the memory option sections of the crypto spec and its normative requirements, with the owner decisions on targets and the trystero migration marked dropped. It follows the tree: a resource failing during base initialisation is unrecoverable on a threaded OpenSSL, and
fail_init_threadsis named in the test list.Verification
From the stream's verify and final-fix reports:
-a: native 180, gcc-15 168, wasip2 141, wasip3 134, emscripten 92, all green. After the final fix wave, native-a(29 memory tests plus docs) and gcc-15 were rerun; the last commits touch native-only docs, Doc Comments and the example.Ruling on a failing resource
A resource that fails during OpenSSL's base initialisation is unrecoverable on a threaded OpenSSL (MSVC always,
threading=multielsewhere): OpenSSL re-enters its own initialisation and the call never returns (abort on macOS, deadlock on Linux, spin on Windows). The resource must serve OpenSSL's start-up. On a single-threaded OpenSSL the failure is permanent and everymakereturnsbackend_failure.fail_initpins the single-threaded behaviour;fail_init_threadspins the threaded boundary. The guide, the Doc Comments, the guidelines and the proposals say the same.Related PRs
🤖 Generated with Claude Code