Skip to content

Nested-eval parse divergence: modernish sys/cmd/harden.mm:404 — rubash -n rejects what GNU accepts #308

Closed

Description

@caomengxuan666

{"title": "Nested-eval string parse divergence at modernish sys/cmd/harden.mm:404: rubash -n rejects what GNU accepts", "labels": ["bug"], "body": "Next modernish layer after #282 (wt12/modinit finding, LF clone fixture): harden.mm:404 nested eval string - our -n parse rejects, GNU accepts. Probe from target/issue-suites/results/issue282/ plus the lane's LF clone (CORPUS-COVERAGE section 1 has the CRLF warning and clone recipe)."}

Activity

  1. added
    bug
    on Sep 29, 2026
  2. added a commit that references this issue on Sep 29, 2026
  3. caomengxuan666 commented on Sep 29, 2026

    @caomengxuan666
    MemberAuthor

    Fixed by wt13/fixpack (2a99e99, master d99124c): update_compound_boundary_stack (shared by 10 scanners) treated reserved words inside case patterns as compound openers (a function body containing (while|break) opened a phantom loop that swallowed the closing brace) and let the newline after IN consume the may-open slot so a real clause paren was misread as extglob nesting. GNU anchors: parse.y:3177-3186 CHECK_FOR_RESERVED_WORD (inside PST_CASEPAT nothing but post-pipe esac is recognized), :3379/3396 IN sets the state, :3788 close-paren clears it, :1225/1231 newline_list. Full harden.mm -n now rc=0 == GNU; 22 keyword matrix clean; case/parser/extglob2-3/comsub zero diff.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions