Skip to content

[bug] eval with no arguments preserves previous $? — GNU resets to 0 #1013

Description

@caomengxuan666

[bug] eval with no arguments preserves previous $? — GNU resets to 0

false; eval ""; echo $?
# GNU bash 5.3:  0
# rubash:        1   (and 127 in a longer script where the previous failure was 127)

Minimal repro above; found via differential battery (eval ''; t 61 ... after a failing command gave 127 under niubash, 0 under GNU).

Env: niubash 1.4.1 / rubash engine (master ~2026-10), GNU bash 5.3.20 aarch64-linux-android as oracle.

Activity

  1. caomengxuan666 commented on Oct 22, 2026

    @caomengxuan666
    MemberAuthor

    Env note: reporter wrote niubash 1.4.1 but the repro environment is 1.4.4 (current). Verification for the fix will run on current master + 1.4.4.

  2. added
    bug
    gnu-baseline
    area:builtins
    P2-medium
    on Oct 22, 2026
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

    P2-mediumarea:builtinsbuggnu-baseline

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions