GNU nano - Bugs: bug #56102, unindenting a partially displayed...
You are not allowed to post comments on this tracker with your current authentication level.
bug #56102: unindenting a partially displayed line can result in a freeze
Submitter: | easyaspi314 <easyaspi314> | ||
Submitted: | Mon 08 Apr 2019 11:25:30 PM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Tue 16 Apr 2019 08:48:27 AM UTC, comment #19: |
Benno Schulenberg <bens> |
Sat 13 Apr 2019 10:00:35 AM UTC, comment #18: Fixed in git, commit 1c707d4f. (Plus the subsequent commit for the commenting/uncommenting and indenting case.)
|
Benno Schulenberg <bens> |
Fri 12 Apr 2019 04:19:45 PM UTC, comment #17: Yes, that should work; there are really several problems here that were all interacting. I'd forgotten about the possibility of firstcolumn's being thrown out of whack by multi-line changes, and it can be difficult to tell when that happens.
|
David Lawrence Ramsey <dolorous> |
Fri 12 Apr 2019 12:12:13 PM UTC, comment #16: Putting in an 'ensure_firstcolumn_is_aligned()' at the end of do_unindent() fixes the issue for me. See attached patch.
|
Benno Schulenberg <bens> |
Fri 12 Apr 2019 11:30:21 AM UTC, comment #15: With the reproduction recipe from the previous comment, the underflow happens when only the tail part (" error_day)") of line 69 is in the top row of the window. When then typing M-{ for the second time, the top row becomes blank, which is weird: one would expect the previous chunk to appear.
|
Benno Schulenberg <bens> |
Fri 12 Apr 2019 10:16:29 AM UTC, comment #14: Yes, can reproduce, in a 31x72 terminal (31 rows, 72 columns).
|
Benno Schulenberg <bens> |
Fri 12 Apr 2019 09:57:05 AM UTC, comment #13: At least 'last_chunk' is uninitialized. But after changing the program to set it to FALSE, I still got:
|
Benno Schulenberg <bens> |
Fri 12 Apr 2019 09:32:49 AM UTC, comment #12: Running the command in valgrind, the first unindent took ages. After two minutes I gave up. Result:
|
Benno Schulenberg <bens> |
Fri 12 Apr 2019 09:10:37 AM UTC, comment #11: With a 74x34 terminal I cannot reproduce the hang either.
|
Benno Schulenberg <bens> |
Wed 10 Apr 2019 01:00:17 PM UTC, comment #10: David, your patch does indeed fix the hang.
|
easyaspi314 <easyaspi314> |
Wed 10 Apr 2019 10:22:58 AM UTC, comment #9: Thanks for the exact series of keystrokes. However, I am unable to reproduce. I've tried with 'nano --ignore --linenum --soft Perishable.cpp' on a terminal of 28 rows and 74 columns. No hang. Probably the hang depends on the precise height of the terminal too? And maybe other options?
|
Benno Schulenberg <bens> |
Wed 10 Apr 2019 09:16:06 AM UTC, comment #8: It should be the same bug, if the formula you gave to reproduce it is for that bug. (I've also checked out the video in comment #2.) Does the underflow still occur with the patch applied?
|
David Lawrence Ramsey <dolorous> |
Wed 10 Apr 2019 03:51:45 AM UTC, comment #7: Yeah, as soon as I saw LLDB break there, I was like "yeaaaah that doesn't look right..."
|
easyaspi314 <easyaspi314> |
Wed 10 Apr 2019 03:04:13 AM UTC, comment #6: The problem is indeed caused by the loop you mention in step 8, which was added in commit 7c30d1f.
|
David Lawrence Ramsey <dolorous> |
Tue 09 Apr 2019 08:30:15 PM UTC, comment #5: I have it 100%.
|
easyaspi314 <easyaspi314> |
Tue 09 Apr 2019 07:35:28 PM UTC, comment #4: How can I tell the expression underflowed? I checked lldb and to_col was 70 and from_col was 77. Therefore, display_string was being called with the value 4294967289.
|
easyaspi314 <easyaspi314> |
Tue 09 Apr 2019 07:09:00 PM UTC, comment #3: How did you conclude that 'to_col - from_col' can underflow?
|
Benno Schulenberg <bens> |
Tue 09 Apr 2019 12:52:26 AM UTC, comment #2: Ok so the video didn't attach and Streamable wasn't cooperating, so I put it on MEGA which unfortunately needs JS which I know Benno is terrified of. Tell me if you need a different upload service. (The website is safe)
|
easyaspi314 <easyaspi314> |
Tue 09 Apr 2019 12:27:00 AM UTC, comment #1: It seems to have something to do with moving the cursor or being next to a character.
|
easyaspi314 <easyaspi314> |
Mon 08 Apr 2019 11:25:30 PM UTC, original submission:
|
easyaspi314 <easyaspi314> |
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 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2019-04-16 | bens | Open/Closed | Open | Closed | |
2019-04-13 | bens | Status | In Progress | Fixed | |
Summary | unindent occasionally causes underflow in update_softwrapped_line() resulting in a freeze | unindenting a partially displayed line can result in a freeze | |||
2019-04-12 | bens | Attached File | - | Added 0001-unindent-ensure-that-a-partial-line-gets-displayed-p.patch, #46759 | |
Status | None | In Progress | |||
Assigned to | None | bens | |||
Summary | Unindent occasionally causes underflow in update_softwrapped_line resulting in a freeze. | unindent occasionally causes underflow in update_softwrapped_line() resulting in a freeze | |||
2019-04-10 | dolorous | Attached File | - | Added 0001-display-don-t-nibble-off-more-zero-width-characters-.patch, #46742 | |
2019-04-09 | easyaspi314 | Attached File | - | Added Perishable.cpp, #46735 |
Powered by Savane 3.13-d3ae.
Corresponding source code
The fix has been released in 4.1.