Repository navigation
v2 spec: rule r8 — no input crashes the process (lands with the next spec batch) - #630
Closed
EricAndrechek wants to merge 1 commit into
Closed
EricAndrechek wants to merge 1 commit into
EricAndrechek wants to merge 1 commit into
Conversation
The library runs in its caller's process, so no input to any call may terminate, abort or corrupt it: the worst answer is CHS_REJECTED, CHS_DECLINED or CHS_INTERNAL (CHS_REJECTED 306 where the stack check applies). A crash ranks with a filter over-accept, a security-severity defect, and is declined with a catalog entry until fixed. The exceptions are named exactly: misuse the ABI already forbids, memory exhaustion outside the admission budgets, and signals from outside the process. gen.py now refuses a Rules section that drops (r8). The fingerprint is unchanged (abi.json is untouched); the header moves only by its preamble's "(r1 to r8)". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
Author
|
Landing checklist (handoff 2026-10-13; #633 item 5):
|
Member
Author
|
Superseded by #655 (spec batch 2). The maintainers ruled that full crash containment is a later generation's guarantee. So the v2 spec's r8 now documents a known-crash list instead of promising that no input crashes the process: a matching schema or filter is declined at create with |
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.
Hold: this lands with the next v2 spec batch, not on its own (the lead's ruling). It is prose and one rule label, so it moves no fingerprint by itself.
What
A new generation-2 rule, (r8) No input crashes the process, normative for the library, in
spec/abi-v2/docs.md's Rules section:No input to any call (an expression, a statement, a type, a settings/options/columns JSON, a body, a server profile) may terminate, abort or corrupt the calling process. An input the library can't handle is
CHS_REJECTED,CHS_DECLINEDorCHS_INTERNAL.A ClickHouse
LOGICAL_ERROR, a failed assertion or a stack running out inside a call isCHS_INTERNAL, never an abort. Where the stack check applies, it isCHS_REJECTED306, as the status list already says.A crash ranks with a filter over-accept: a security-severity defect, never documented as behaviour. Until it is fixed, the shape is declined, with a catalog entry.
The exceptions, exactly:
chs_initializecalls at once,process_once); use after free; unloading, or initializing again afterchs_shutdown;A second
chs_initializewith a different spelling, made after the first returns, is NOT an exception: the spec already makes itCHS_INVALID_ARGUMENT, and r8 holds for it.Also in this PR:
scripts/abi-v1/model.py:GENERATION_RULESgainsr8, sogen.py --checkrefuses a Rules section that drops it.Measured
sha256:d60a681ea0e249ab9e2c83b50640ad9cef040261ddf61805106c93e2c68774e4.include/v2/chtypes.h:a509580c…→1e707565fbe5c1882220cb19418ad79e5df0babbdf19d7761cb4e4bce0e1cc3c. Only the preamble line moves.gen.py --selftest;--major 2 --checkand--major 1 --check;check-no-hand-decls.py --scope all;lint-spellingandlint-cited-paths;markdownlint-cli2@0.18.1(52 files, 0 errors) anddprint@0.57.4 check;lint-public(run last):ok — no pointers into the private repository, its private notes, or a local filesystem.🤖 Generated with Claude Code