Repository navigation
build01: ask the stack-protector question of the stack-protector switch - #17
Merged
Merged
Conversation
hongdy22
force-pushed
the
fix/build01-ssp-switch-detection
branch
from
September 14, 2026 05:46
e3de007 to
a40e1cd
Compare
§1.10 does not say what the port must call its replacement for `--disable-ssp`, so `feature_switch()` looks the name up rather than assuming it. It matched any pattern against a name-sorted cache, so `feature_switch(r"SSP", r"STACK")` answered with SODIUM_ACCEPTS_NOEXECSTACK: a probe recording whether the assembler takes `--noexecstack`, which sorts before SODIUM_USE_SSP and matches the broad pattern. The check then turned that off, found `-fstack-protector` still on every compile line, and reported that SSP could not be disabled -- about a variable that never controlled it. Patterns are now tried in order, which is the rule the Autotools branch beside it already followed, and cache entries CMake marks INTERNAL or STATIC are skipped: a capability probe is not something anyone configuring the build can set, so it cannot be the control §1.10 asks for. The call site's second pattern narrows from `STACK` to `STACK_?PROTECT`, which describes one flag instead of two. `srb_skip_ok` goes with it. Narrowing the pattern made `None` -- no such control anywhere in the cache -- a likelier answer, and a skip is charged and does not pass, so without this the fix would have moved that port from a wrong failure to a right one that still costs the stage. The line `pytest_module` draws is whether the reference can answer: State A's `configure --help` has `--disable-ssp`, and across the preserved cells this row reads 12 pass and 3 fail beside its skips. It is a question submissions answer, so the record now says the contract does not permit the omission instead of calling it permitted. No submission's variable name is written down anywhere: the regression test runs five spellings a port might choose, and the case that reproduces the report passes the original `(SSP, STACK)` patterns.
hongdy22
force-pushed
the
fix/build01-ssp-switch-detection
branch
from
September 14, 2026 06:19
a40e1cd to
23c65a7
Compare
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.
Fixes #12.
feature_switch()matched any pattern against a name-sorted cache, sofeature_switch(r"SSP", r"STACK")answered withSODIUM_ACCEPTS_NOEXECSTACK— a probe about the assembler, sorting beforeSODIUM_USE_SSPand matching the broad pattern. The check then graded a variable that never controlled the stack protector.INTERNALorSTATICare skipped: a capability probe is not a control anyone can set.STACKtoSTACK_?PROTECT.No submission's option name is written down anywhere.
Also dropped:
srb_skip_okon this check. Narrowing the pattern makesNonea likelier answer, so without this the fix would swap a wrong failure for a skip — which is charged and does not pass, and costs the stage all the same. That charge is the published rule, inscores_raw/LEGEND.md: "skip 进分母算 0:别的模型能跑出产物、这个模型跳过了,那是它自己的问题". It holds with no exception — 313 skipped checks on 42 cells across the published tables, all 42 scoring 0.This check belongs on that side. §1.10 lists
-fstack-protectoras "overridable, the way--disable-sspwas" and offers no exemption; State A answers it, since--disable-sspis inconfigure --help; and models answer it — it is every one of build01'shardeningskips (7 cells published) and reads 12 pass and 3 fail beside them. Only the wording changes: the record now says the contract required the switch instead of calling its absence permitted.Regression:
infra/tests/test_build01_feature_switch.py, 14 checks against caches on disk — five spellings a port might choose,Nonefor a probe-only cache, and the report reproduced with the original(SSP, STACK)patterns. Fails onmain(3 of 14). The seven infra suites stay at 556 passed.