Skip to content

Repl Crashes in infinite Async recursion #40502

@ramonGonzEdu

Description

@ramonGonzEdu

Version

v16.1.0

Platform

Linux linx-PC 5.8.0-63-generic #71-Ubuntu SMP Tue Jul 13 15:59:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

Repl

What steps will reproduce the bug?

  1. Open node repl
  2. Type (async (a)=>a(a))(async (a)=>a(a)) but don't press return
  3. Crash

How often does it reproduce? Is there a required condition?

100% of the time.

What is the expected behavior?

The repl should not crash.

What do you see instead?

RangeError: Maximum call stack size exceeded
    at <anonymous>:1:19
    at <anonymous>:1:30
    at <anonymous>:1:30
    at <anonymous>:1:30
    at <anonymous>:1:30
    at <anonymous>:1:30
    at <anonymous>:1:30
    at <anonymous>:1:30
    at <anonymous>:1:30
    at <anonymous>:1:30

Additional information

Typing (a=>a(a))(a=>a(a)) doesn't crash and only prints the error after you press enter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.linuxIssues and PRs related to the Linux platform.replIssues and PRs related to the REPL subsystem.

    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