Skip to content

Stored U+E314 value used as a name renders the E400 pair: command-not-found diagnostic and redirect filename #3040

Closed

Description

@caomengxuan666

Repro (both via -c, exact bytes)

A stored U+E314 value used as a name renders its E400 literal-char
escape pair instead of the raw char. Two sites, same family:

1. Command-not-found diagnostic names the E400 pair

v=$'\uE314'; "$v"
  • GNU: bash: line 1: <U+E314>: command not found (raw char, bytes EE 8C 94), rc 127.
  • rubash: rubash: line 1: <U+E400><U+E314>: command not found (pair, bytes EE 90 80 EE 8C 94), rc 127.

2. Redirect target filename carries the E400 pair

cd <dir> && v=$'\uE314' && { echo x > "$v"; } 2>&1

Both shells rc 0 with no output, but the created file's name differs:

  • GNU: file named <U+E314> (bytes EE 8C 94).
  • rubash: file named <U+E400><U+E314> (bytes EE 90 80 EE 8C 94) — the
    carrier encoding escapes into the filesystem.

Expected

The raw char in both places. The stored value's E400 pair is an internal
encoding of a literal char; it must be decoded before the value is used as
a command name or a filename, exactly as it already is at the external
boundaries (argv/env reach real children as the raw char, fixed by #2881).

Evidence

Relation to other E400-pair gaps

Same family as #3038 (expand_prompt does not decode the pair for U+E314)
and #3016 (U+E316 folds to a backslash in assignment concatenation):
a stored value's E400 pair is not decoded at a rendering/use boundary.
Different sites and guard chars; not the same fix.

Destination

1.5.1 (rubash #2885 E6 follow-up; fix lane to be dispatched).

Activity

  1. added
    bug
    on Nov 7, 2026
  2. added
    gnu-baseline
    area:carrier
    on Nov 7, 2026
  3. caomengxuan666 commented on Nov 8, 2026

    @caomengxuan666
    MemberAuthor

    已由 PR #3075 修复并合入 master(squash merge 8a28d350,合入头 5fe67c9d)。

    队长复核(~/workspace/review-3040/verify.log,全腿 PASS)

    • golden 20/0;fail-first(真基底 4984ce5c + 仅钉文件)19p/1f,唯一失败 diagnostics_carry_no_markers,left 逐字为 \u{e400}\u{e314} 泄漏形,与本单一致。
    • lib 头/基底双边 1200/0/4 一致;邻茎 registry 10/0、cat_redirect 2/0、issue0113 6/0、issue1127 1/0、issue1208 3/0。
    • 已知红茎双边对照(deep_audit_b6_diagnostics 7/1、issue1025_… 14/2)头/基底失败名集逐一相同——既存环境形,非本改动。
    • RUSTFLAGS="-D warnings" rc=0;fmt/hygiene/CR 净;marker-lint OK(117/260);api-ledger 281 符号全在。
    • GNU 字节探针(LC_ALL=C.UTF-8):command-not-found / open-error / failglob 三形 SAME;重定向落盘名两边同为 ee 8c 94 0a。
    • 合入头 CI 全集:11 项 10 pass + 1 skipping,零 fail。

    修法:printable_filename 未引号分支与 redirect_operand_literal(+ failglob 诊断共享 helper)同以 U+E400 存在性门控,折回时调用 #2881 的同一解码器,解码器本体零改动。同族其余四面(PATH 查找 / slash execve 分类 / cd 操作数 / exec 诊断)已立 #3076 处置。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:carrierbuggnu-baseline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions