Skip to content

bug(linter/tree_shaking): stack overflow #4164

@Boshen

Description

@Boshen
rust-lldb -- ./target/debug/oxlint -D all -D nursery --fix '/Users/boshen/Downloads/A/OXC_stack_overflow__(80 bytes) - 16088484645078759892/problematic_file.js'
* thread #4, stop reason = EXC_BAD_ACCESS (code=2, address=0x17021bfc8)
    frame #0: 0x0000000100248420 oxlint`oxc_linter::utils::tree_shaking::is_pure_function::h9638ee2cc049bd80 + 12
oxlint`oxc_linter::utils::tree_shaking::is_pure_function::h9638ee2cc049bd80:
->  0x100248420 <+12>: str    x0, [sp, #0x38]
    0x100248424 <+16>: str    x1, [sp, #0x40]
    0x100248428 <+20>: bl     0x1002483b8               ; _$LT$oxc_linter..utils..tree_shaking..FunctionName$u20$as$u20$oxc_span..span..GetSpan$GT$::span::h9f64e8c7284cc09b
    0x10024842c <+24>: ldr    x8, [sp, #0x40]
Target 0: (oxlint) stopped.
function f() {
  try {
    f();
  } catch(e) {
    a.map(v => v + 1);
  }
}
f();

discovered in #4111

Metadata

Metadata

Assignees

Labels

C-bugCategory - Bug

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions