Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(linter/tree_shaking): stack overflow #4164

Closed
Boshen opened this issue Jul 10, 2024 · 3 comments · Fixed by #4191
Closed

bug(linter/tree_shaking): stack overflow #4164

Boshen opened this issue Jul 10, 2024 · 3 comments · Fixed by #4191
Assignees
Labels
C-bug Category - Bug

Comments

@Boshen
Copy link
Member

Boshen commented Jul 10, 2024

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

@Boshen Boshen added the C-bug Category - Bug label Jul 10, 2024
@Boshen
Copy link
Member Author

Boshen commented Jul 11, 2024

@mysteryven can you take a look at this when you have the time, I'd like to make a release for the fuzzer guy to test on 🤣

@mysteryven
Copy link
Contributor

I am reviewing code, let me fix this first.

@DonIsaac
Copy link
Contributor

Can this be closed @mysteryven?

@Boshen Boshen closed this as completed Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants