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

Panic attempt to shift right with overflow in oxc_linter/src/utils/tree_shaking.rs when fixing file #4628

Closed
qarmin opened this issue Aug 4, 2024 · 1 comment · Fixed by #4647
Assignees
Labels
C-bug Category - Bug

Comments

@qarmin
Copy link

qarmin commented Aug 4, 2024

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):

        v36 % (4096 >>> 4096);

command

timeout -v 100 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
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
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

thread '<unnamed>' panicked at crates/oxc_linter/src/utils/tree_shaking.rs:424:41:
attempt to shift right with overflow
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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

compressed.zip

@qarmin qarmin added the C-bug Category - Bug label Aug 4, 2024
@rzvxa
Copy link
Collaborator

rzvxa commented Aug 4, 2024

cc @mysteryven

@DonIsaac DonIsaac self-assigned this Aug 5, 2024
Boshen pushed a commit that referenced this issue Aug 5, 2024
Closes #4628

Also fixes an identical bug in `<<`
Boshen pushed a commit that referenced this issue Aug 5, 2024
Closes #4628

Also fixes an identical bug in `<<`
@DonIsaac DonIsaac closed this as completed Aug 5, 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