Skip to content

constructs.lua short-circuit harness fails at level=4 deep composition #281

Closed

Description

@davydog187

Symptom

The dynamic short-circuit harness at test/lua53_tests/constructs.lua:287-298 builds programs of the form ((((a op b) op c) op d) op e) for every combination of and/or and the basiccases values, compiles each via load(...), runs it, and asserts the result matches a precomputed truth value.

  • At level=3 (4105 cases): all pass.
  • At level=4 (the suite default since _soft is unset): the harness eventually fails with a bare assert(false) ("assertion failed!") at roughly the 120000-iteration mark.

The level=3 standalone repro at /tmp/triage_short_circuit.exs (lifted from constructs.lua) is the starting point.

Reclassification from A42

A42 noted this range as "load()-driven short-circuit harness; pending separate triage" but the load() call itself is fine:

  • load() is installed by the suite runner at tasks/suite_runner.ex:141-156.
  • A minimal single-case repro (/tmp/triage_constructs_load.exs) passes end-to-end.

The actual failure is in evaluating one of the deeply-composed and/or expressions — an executor short-circuit semantics edge case at depth 4. Possibly register-aliasing under the conditional jump bytecode, possibly a not precedence wrinkle, possibly something else. Not load().

Next steps (not in scope here)

A bisection pass: at level=4, identify the smallest failing cases[n][k] expression and reduce it to a 1-line repro. Then classify and fix or skip.

Related

Activity

  1. added
    bugSomething isn't working
    direction:ADirection A: suite triage to 0.5.0
    kind:suiteLua 5.3 official test suite work
    on May 28, 2026
  2. added a commit that references this issue on Jun 1, 2026
    30c913b
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

    bugSomething isn't workingdirection:ADirection A: suite triage to 0.5.0kind:suiteLua 5.3 official test suite work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions