GNU nano - Bugs: bug #60658, "undefined behavior"...
You are not allowed to post comments on this tracker with your current authentication level.
bug #60658: "undefined behavior" when searching backwards
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Sun 23 May 2021 09:45:32 AM UTC | ||
Severity: | 2 - Minor | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Mon 24 May 2021 09:04:42 AM UTC, comment #2: |
Benno Schulenberg <bens> |
Sun 23 May 2021 09:51:31 AM UTC, comment #1: Fixed in git, commit ceaae49b, by reversing the subtraction, as at that point 'needle_len' is always bigger than 'tail_len'. |
Benno Schulenberg <bens> |
Sun 23 May 2021 09:45:32 AM UTC, original submission:
To reproduce, configure nano with "-O0 -fsanitize=undefined" in your CFLAGS, compile, and then run:
Then type: ^Q what <Enter> ^X
|
Benno Schulenberg <bens> |
No files currently attached
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 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2021-06-16 | bens | Open/Closed | Open | Closed | |
2021-05-23 | bens | Status | None | Fixed |
Powered by Savane 3.13-758e.
Corresponding source code
Another "undefined behavior" happened when I searched backward case-sensitively. :| I forgot to check wehther there were more occurrences of 'tail_len - needle_len'. Fixed now in git, commit 30bafc70.