Skip to content

Infinite loop when evaluating circular references #2883

Open
@CZX123

Description

@CZX123

A circular reference inside the playground code leads to an infinite loop, crashing the Source Academy. An example can be seen by running the below code:

const a = [];
a[0] = a;

This affects all available runners of all TS, JS, and Scheme variants, except Source §3 Concurrent (which is based on a VM).

The console error appears to be caused by "immer" module, but the error is logged from SafeEffects.ts:

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingcriticalFixing this is mission-criticalregressiona feature that was working before but stopped working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions