-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
What version of ripgrep are you using?
ripgrep 13.0.0
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
How did you install ripgrep?
Homebrew
What operating system are you using ripgrep on?
macOS Big Sur, Intel.
Describe your bug.
Ripgrep segfaults when using -w
option with an empty string.
What are the steps to reproduce the behavior?
- Create a new directory
- Download https://raw.githubusercontent.com/neovim/neovim/master/README.md
rg -w ''
(Happens in most directories with a wide variety of contents, but haven't come up with a minimal example by manually adding content to an empty file.)
What is the actual behavior?
thread '<unnamed>' panicked at 'assertion failed: self.start <= end', /private/tmp/ripgrep-20210612-52810-yuhb53/ripgrep-13.0.0/crates/matcher/src/lib.rs:131:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any', crates/ignore/src/walk.rs:1302:31
followed by a hang.
What is the expected behavior?
Ripgrep shouldn't segfault and ignore the -w
option. (Which I believe version 12 did, which doesn't segfault on this command.)
Removing the pointless -w
option works as expected, but I thought I'd report it anyway in case this is a symptom of a deeper issue that may have more serious consequences.
Metadata
Metadata
Assignees
Labels
No labels