Repository navigation
readonly/export compound operand: one err_readonly line then DISCARD (Refs #2658) - #3598
Merged
Merged
Conversation
…(Refs #2658) [upstream] A W_COMPASSIGN operand of an assignment builtin binds during word expansion (subst.c:12949-13036 expand_declaration_argument). A readonly refusal on that nested bind splits by builtin family: - export/readonly (setattr.def): err_readonly prints the bare `{name}: readonly variable` and the failure is a real DISCARD (subst.c:13033 exp_jump_to_top_level) — inside a function the body is abandoned after the single line, before the special builtin runs. rubash printed the refusal twice and let the function continue. - declare/typeset/local: the nested bind surfaces through builtin_error with this_command_name = the enclosing function name (`f: r: readonly variable`), skips the bind, and the outer builtin reports the operand again — rubash emitted the first line without the function-name segment. Pin: tests/issue2658_readonly_compound_abort.rs (6 cases, byte-checked against vendored GNU bash 5.3.20 script-file runs). Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Member
Author
|
【WIN-AGENT-AUDIT】 机制核查:
腿:
F 点:无 未跑/VOID 的腿:本地全量 lib 与 -D warnings 全量 check 未跑(以 CI head 腿 + fmt/编译通过代替判读)。 |
Member
Author
|
【队长终裁】PASS 核过审计报告(6886804126)+ CI 全表。钉 6/6,fail-first 2/4(4 红 = issue 形状:base err_readonly 行打印两次、缺 |
caomengxuan666
marked this pull request as ready for review
November 15, 2026 02:05
This was referenced Nov 15, 2026
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.
Summary
[upstream] A W_COMPASSIGN operand of an assignment builtin binds during
word expansion (subst.c:12949-13036 expand_declaration_argument). A
readonly refusal on that nested bind splits by builtin family:
{name}: readonly variableand the failure is a real DISCARD(subst.c:13033 exp_jump_to_top_level) — inside a function the body is
abandoned after the single line, before the special builtin runs.
rubash printed the refusal twice and let the function continue.
with this_command_name = the enclosing function name (
f: r: readonly variable), skips the bind, and the outer builtin reportsthe operand again — rubash emitted the first line without the
function-name segment.
Pin: tests/issue2658_readonly_compound_abort.rs (6 cases, byte-checked
against vendored GNU bash 5.3.20 script-file runs).
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>