You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
std and contrib call other modules' raw layer (97 calls in 49 files) instead of their public API #3107
std and contrib call other modules' raw layer instead of their public API (owner report). A std module binds C through *_raw externs and builds its public functions on them; nothing keeps another module from calling the raw layer directly, so 49 files make 97 such calls, outside the module that declares them:
Calling the raw layer skips what the public function adds: error results (T!), ownership (@aether/@retain on the stores), bounds checks (slices), and the documented contract, and it ties the caller to a C binding the module is free to change.
Fix:
Every cross-module raw call moves to the module's public API (slices for the int and long buffers), each module verified by its own tests and test vectors, the cryptography modules' throughput measured before and after.
A check in Aether, run in CI, that no std or contrib file calls a *_raw extern declared in another module, so it does not come back.
Where a public function a caller needs does not exist, it is added (no new raw call).
Activity
The TLS modules, the load balancer and tinyweb's tests call std's pub…
std.bignum and the cryptography modules hold their buffers as arrays …
std and contrib use the containers' public functions; list.at and map…
make check-raw-calls: no std or contrib file calls a raw C binding an…
std's cryptography modules and the raw-calls fixture in ae fmt's layo…
A DER length past the input is refused, however large