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

🐛 Stack overflow, when adding >2000 empty strings #4563

Open
1 task done
qarmin opened this issue Nov 18, 2024 · 0 comments
Open
1 task done

🐛 Stack overflow, when adding >2000 empty strings #4563

qarmin opened this issue Nov 18, 2024 · 0 comments
Labels
S-Needs triage Status: this issue needs to be triaged

Comments

@qarmin
Copy link

qarmin commented Nov 18, 2024

Environment information

Biome was self-compiled with address sanitizer

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           unset
  JS_RUNTIME_NAME:              unset
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       unset

Workspace:
  Open Documents:               0

What happened?

timeout -v 150 biome lint TEST___FILE.ts

crashes with

AddressSanitizer:DEADLYSIGNAL
=================================================================
==1006804==ERROR: AddressSanitizer: stack-overflow on address 0x7f56ce800fd8 (pc 0x564d75e4387c bp 0x7f56ce801050 sp 0x7f56ce800fe0 T1)
    #0 0x564d75e4387c in biome_rowan::cursor::node::SyntaxNode::first_child_or_token::h6883b7ab740af599 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:218
    #1 0x564d75e44b64 in biome_rowan::cursor::node::SyntaxElementChildren::new::h53a98537b7d88295 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:495:19
    #2 0x564d75e44b64 in biome_rowan::cursor::node::SyntaxNode::children_with_tokens::h523cdd041a4df0e1 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:175:9
    #3 0x564d75e44b64 in biome_rowan::cursor::node::SyntaxNode::token_at_offset::h2d5cad6b5c006e7c /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:334:33
    #4 0x564d75e613a9 in biome_rowan::cursor::element::_$LT$impl$u20$biome_rowan..utility_types..NodeOrToken$LT$biome_rowan..cursor..node..SyntaxNode$C$biome_rowan..cursor..token..SyntaxToken$GT$$GT$::token_at_offset::h8e0c87d5ab852710 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/element.rs:93:40
    #5 0x564d75e451dc in biome_rowan::cursor::node::SyntaxNode::token_at_offset::h2d5cad6b5c006e7c /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:351:13
    #6 0x564d75e613a9 in biome_rowan::cursor::element::_$LT$impl$u20$biome_rowan..utility_types..NodeOrToken$LT$biome_rowan..cursor..node..SyntaxNode$C$biome_rowan..cursor..token..SyntaxToken$GT$$GT$::token_at_offset::h8e0c87d5ab852710 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/element.rs:93:40
    #7 0x564d75e451dc in biome_rowan::cursor::node::SyntaxNode::token_at_offset::h2d5cad6b5c006e7c /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:351:13
    #8 0x564d75e613a9 in biome_rowan::cursor::element::_$LT$impl$u20$biome_rowan..utility_types..NodeOrToken$LT$biome_rowan..cursor..node..SyntaxNode$C$biome_rowan..cursor..token..SyntaxToken$GT$$GT$::token_at_offset::h8e0c87d5ab852710 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/element.rs:93:40
    #9 0x564d75e451dc in biome_rowan::cursor::node::SyntaxNode::token_at_offset::h2d5cad6b5c006e7c /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:351:13
    #10 0x564d75e613a9 in biome_rowan::cursor::element::_$LT$impl$u20$biome_rowan..utility_types..NodeOrToken$LT$biome_rowan..cursor..node..SyntaxNode$C$biome_rowan..cursor..token..SyntaxToken$GT$$GT$::token_at_offset::h8e0c87d5ab852710 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/element.rs:93:40
    #11 0x564d75e451dc in biome_rowan::cursor::node::SyntaxNode::token_at_offset::h2d5cad6b5c006e7c /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:351:13
    #12 0x564d75e613a9 in biome_rowan::cursor::element::_$LT$impl$u20$biome_rowan..utility_types..NodeOrToken$LT$biome_rowan..cursor..node..SyntaxNode$C$biome_rowan..cursor..token..SyntaxToken$GT$$GT$::token_at_offset::h8e0c87d5ab852710 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/element.rs:93:40
    #13 0x564d75e451dc in biome_rowan::cursor::node::SyntaxNode::token_at_offset::h2d5cad6b5c006e7c /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:351:13
    #14 0x564d75e613a9 in biome_rowan::cursor::element::_$LT$impl$u20$biome_rowan..utility_types..NodeOrToken$LT$biome_rowan..cursor..node..SyntaxNode$C$biome_rowan..cursor..token..SyntaxToken$GT$$GT$::token_at_offset::h8e0c87d5ab852710 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/element.rs:93:40
    #15 0x564d75e451dc in biome_rowan::cursor::node::SyntaxNode::token_at_offset::h2d5cad6b5c006e7c /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/biome-main/crates/biome_rowan/src/cursor/node.rs:351:13
    #16 0x564d75e613a9 in
    ....

file - compressed.zip

Expected result

No crash

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@qarmin qarmin added the S-Needs triage Status: this issue needs to be triaged label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Needs triage Status: this issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant