Skip to content

crypto: OpenSSL memory option (gitlink, guidelines, tooling fixtures) - #30

Merged
pinhopro merged 25 commits into
mainfrom
crypto/openssl-memory
Nov 18, 2026
Merged

pinhopro merged 25 commits into
mainfrom
crypto/openssl-memory

Conversation

@pinhopro

@pinhopro pinhopro commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What the option does

webcpp::crypto's OpenSSL memory option routes every allocation OpenSSL makes in the process through a std::pmr memory resource that the program chooses, by installing three adapter functions with CRYPTO_set_mem_functions (install_memory_functions(), called first in main). It is native only: it is refused on all WebAssembly targets (Emscripten, WASIp2, WASIp3) with a diagnostic naming the target.

This PR carries the superproject side: the libs/crypto gitlink bump to the pushed library head (cc2b801), the crypto coding guidelines for the option, a 0.1.0 release note wording fix, and tooling fixtures.

Shared tooling: the diff touches tools/, only under tools/test/fixtures/crypto_jamfiles/ (new Jamfile fixtures for the memory option). Nothing under .github/ changes.

Verification

From the stream's verify and final-fix reports:

  • Full lint, clean after the final fixes.
  • Five lanes, -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.
  • C suites (x4), docs and site builds, and the tools tests: green.
  • Linux gcc-15 container: 27/27 (29 after the final fixes).
  • Local MSVC lane (Wine): 14.3 and 14.5 green except the 8 known Wine failures. The memory link-fail cases fail on LNK2019/LNK1120 and LNK2038 as required.

Ruling on a failing resource

A resource that fails during OpenSSL's base initialisation is unrecoverable on a threaded OpenSSL (MSVC always, threading=multi elsewhere): 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 every make returns backend_failure. fail_init pins the single-threaded behaviour; fail_init_threads pins the threaded boundary. The guide, the Doc Comments, the guidelines and the proposals say the same.

Related PRs

🤖 Generated with Claude Code

R added 25 commits November 17, 2026 11:18
…3.5.9's counts, and clean on Linux's clang-tidy
…nconditionally, and fail_init pins OpenSSL 3.5.9's dead queue and unfreed blocks
…datachannel's static initialisers it links
Chapter 15's crypto entry gains OpenSSL's memory option as stream M built
it: native only and refused on every WebAssembly target, the defaults told by
their three addresses, its tests and fixtures; the allocation rule states the
option and the error values 13 and 14 are the option's. Chapter 17's block
leaves and chapter 16's crypto line drops it. Chapter 19 records that a
libcrypto DLL is refused where the specification has a Windows branch.
…resource, and generate_test's docstring keeps to 100 columns
…rary

The owner dropped plan Tasks 31 and 32 on 2026-11-17: chapter 16's crypto
line drops trystero's code on the library, and chapter 17's block "trystero's
migration (increment 3)" leaves.
…ure on a threaded OpenSSL, OPENSSL_thread_stop on Windows and fail_init_threads
…READS, the Windows thread cost, the page's and Doc Comments' precision)
…ording, OPENSSL_thread_stop on every path of the example)
@pinhopro
pinhopro merged commit 6266660 into main Nov 18, 2026
130 of 179 checks passed
@pinhopro
pinhopro deleted the crypto/openssl-memory branch November 18, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant