Skip to content

Stack overlow in oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs when checking file #6583

@qarmin

Description

@qarmin

File content(at the bottom should be attached raw, not formatted file - github removes some non-printable characters, so copying from here may not work):

class B{o(a={}){const attribute=attribute
c.get(attribute)}}

command

timeout -v 150 oxlint -D all -D nursery --import-plugin --jsdoc-plugin --jest-plugin --vitest-plugin --jsx-a11y-plugin --nextjs-plugin --react-perf-plugin TEST___FILE.js --fix

App was compiled with nightly rust compiler to be able to use address sanitizer
(You can ignore this part if there is no address sanitizer error)
On Ubuntu 24.04, the commands to compile were:

rustup default nightly
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
rustup component add llvm-tools-preview --toolchain nightly-x86_64-unknown-linux-gnu

export RUST_BACKTRACE=1 # or full depending on project
export ASAN_SYMBOLIZER_PATH=$(which llvm-symbolizer-18)
export ASAN_OPTIONS=symbolize=1
RUSTFLAGS="-Zsanitizer=address" cargo +nightly build --target x86_64-unknown-linux-gnu

cause this

AddressSanitizer:DEADLYSIGNAL
=================================================================
==941519==ERROR: AddressSanitizer: stack-overflow on address 0x7fe4ce800ff8 (pc 0x5604c36982d1 bp 0x7fe4ce801070 sp 0x7fe4ce800fe0 T4)
    #0 0x5604c36982d1 in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:204
    #1 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #2 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #3 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #4 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #5 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #6 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #7 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #8 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #9 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #10 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #11 0x5604c36988cf in 
    ...
    #243 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #244 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #245 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29
    #246 0x5604c36988cf in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:234:29

SUMMARY: AddressSanitizer: stack-overflow /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/crates/oxc_linter/src/rules/oxc/no_async_endpoint_handlers.rs:204 in oxc_linter::rules::oxc::no_async_endpoint_handlers::NoAsyncEndpointHandlers::check_endpoint_expr::h87c3b9583b435b7b
Thread T4 created by T0 here:
    #0 0x5604c31bee11 in pthread_create /rustc/llvm/src/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:250:3
    #1 0x5604c3f01bf1 in std::sys::pal::unix::thread::Thread::new::hb64d8e2cee68a552 /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/sys/pal/unix/thread.rs:84:19
    #2 0x5604c385dfff in std::thread::Builder::spawn_unchecked_::h33fcadef3b2d8c5f /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:577:30
    #3 0x5604c385dfff in std::thread::Builder::spawn_unchecked::he5fbe26f651ec24e /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:447:32
    #4 0x5604c385331e in std::thread::Builder::spawn::h4d749393fe877594 /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:380:18
    #5 0x5604c385331e in _$LT$rayon_core..registry..DefaultSpawn$u20$as$u20$rayon_core..registry..ThreadSpawn$GT$::spawn::h0c06e5a4c44fdd35 /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs:98:11
    #6 0x5604c38549ae in rayon_core::registry::Registry::new::hb39f449d41a876d6 /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs:304:29
    #7 0x5604c3851de9 in rayon_core::registry::default_global_registry::h95b27d6c1c3d8c57 /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs:201:18
    #8 0x5604c3851de9 in core::ops::function::FnOnce::call_once::h0d976a0b359a4890 /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #9 0x5604c3851de9 in rayon_core::registry::set_global_registry::_$u7b$$u7b$closure$u7d$$u7d$::h469447dd497f8c4b /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs:193:18
    #10 0x5604c3851de9 in std::sync::once::Once::call_once::_$u7b$$u7b$closure$u7d$$u7d$::ha77fe7f56ce7a696 /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once.rs:158:41
    #11 0x5604c3f046a2 in std::sys::sync::once::futex::Once::call::h5144f80b0eef792f /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/sys/sync/once/futex.rs:177:21
    #12 0x5604c3853769 in std::sync::once::Once::call_once::h8b487529b5b56f40 /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once.rs:158:9
    #13 0x5604c3853769 in rayon_core::registry::set_global_registry::haabdc9d0a4a766ea /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs:192:5
    #14 0x5604c3853769 in rayon_core::registry::global_registry::h607a9921894a82fa /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs:166:5
    #15 0x5604c38554cf in rayon_core::registry::Registry::current::h039508487be9ea45 /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs:319:17
    #16 0x5604c32b998d in _$LT$oxlint..lint..LintRunner$u20$as$u20$oxlint..runner..Runner$GT$::run::h556611155425a4c8 /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/apps/oxlint/src/lint/mod.rs:146:9
    #17 0x5604c3218580 in oxlint::main::h8d8a2e9366dfae3e /home/runner/work/Automated-Fuzzer/Automated-Fuzzer/oxc-main/apps/oxlint/src/main.rs:18:5
    #18 0x5604c321fe85 in core::ops::function::FnOnce::call_once::hc3f38a20ee7e85e6 /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #19 0x5604c321fe85 in std::sys::backtrace::__rust_begin_short_backtrace::h13482f82b0587c74 /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:154:18
    #20 0x5604c3ef3dfd in core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnOnce$LT$A$GT$$u20$for$u20$$RF$F$GT$::call_once::h1043265cd580ed94 /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/core/src/ops/function.rs:284:13
    #21 0x5604c3ef3dfd in std::panicking::try::do_call::hb5c29842f49b5948 /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/panicking.rs:557:40
    #22 0x5604c3ef3dfd in std::panicking::try::h04f863188af5f3b4 /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/panicking.rs:520:19
    #23 0x5604c3ef3dfd in std::panic::catch_unwind::h72fdd0df4ae3366f /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/panic.rs:358:14
    #24 0x5604c3ef3dfd in std::rt::lang_start_internal::_$u7b$$u7b$closure$u7d$$u7d$::h7414bcd7e2ab39f1 /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/rt.rs:174:48
    #25 0x5604c3ef3dfd in std::panicking::try::do_call::h38b2c552d6579f14 /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/panicking.rs:557:40
    #26 0x5604c3ef3dfd in std::panicking::try::h739c9016fd0bbae4 /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/panicking.rs:520:19
    #27 0x5604c3ef3dfd in std::panic::catch_unwind::h3c0759403b79e69b /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/panic.rs:358:14
    #28 0x5604c3ef3dfd in std::rt::lang_start_internal::hcb6e57c5b744c08d /rustc/9322d183f45e0fd5a509820874cc5ff27744a479/library/std/src/rt.rs:174:20
    #29 0x5604c32196fb in std::rt::lang_start::hd8a0d22404969d9a /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:194:17
    #30 0x7fe4d1a2a1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #31 0x7fe4d1a2a28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6)
    #32 0x5604c3150544 in _start (/home/runner/.cargo/bin/oxlint+0x815544) (BuildId: e9da55afdfe6c357f7367bffd1cef449493fa897)

==941519==ABORTING

##### Automatic Fuzzer note, output status "Some(1)", output signal "None"

compressed.zip

Metadata

Metadata

Assignees

Labels

A-linterArea - LinterC-bugCategory - Bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions