GNU nano - Bugs: bug #45626, replacing the regex anchor $...
You are not allowed to post comments on this tracker with your current authentication level.
bug #45626: replacing the regex anchor $ causes an infinite loop
Submitter: | None | ||
Submitted: | Sat 25 Jul 2015 01:52:46 PM UTC | ||
Severity: | 4 - Important | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Sun 26 Jul 2015 08:27:17 AM UTC, comment #2: |
Benno Schulenberg <bens> |
Sat 25 Jul 2015 04:56:45 PM UTC, comment #1: Thanks for reporting. Strangely, it doesn't happen when doing the replacing in the Backwards direction -- apparently there the zero-length case is taken into account.
|
Benno Schulenberg <bens> |
Sat 25 Jul 2015 01:52:46 PM UTC, original submission:
Replacing empty space (for example '^' or '$') causes nano to go into an infinite loop consuming as much CPU and memory as possible, until it is killed by the OOM killer. Presumably it repeatedly replaces the empty space. |
Anonymous |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 7 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2015-12-07 | bens | Open/Closed | Open | Closed | |
2015-07-26 | bens | Status | In Progress | Fixed | |
Summary | RegExp replacing empty with empty causes infinite loop | replacing the regex anchor $ causes an infinite loop | |||
2015-07-25 | bens | Attached File | - | Added skip-zero-length-match.patch, #34524 | |
Severity | 3 - Normal | 4 - Important | |||
Status | None | In Progress | |||
Assigned to | None | bens |
Powered by Savane 3.13-d3ae.
Corresponding source code
Also a useful replacement can cause an infinite loop:
'nano README', M-R M-R $ <Enter> oops <Enter>,
and then keep typing Y.
Fixed in SVN, r5319. Thanks again for reporting.
(A related problem has been reported in bug #45630.)