Skip to content

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

@davydog187

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

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions