GNU nano - Bugs: bug #60537, nano crashes when terminal is...
You are not allowed to post comments on this tracker with your current authentication level.
bug #60537: nano crashes when terminal is resized while linter is running
Submitter: | Filips Romāns <fjr> | ||
Submitted: | Thu 06 May 2021 09:16:21 AM UTC | ||
Severity: | 4 - Important | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Wed 16 Jun 2021 09:33:52 AM UTC, comment #8: |
Benno Schulenberg <bens> |
Thu 06 May 2021 12:43:04 PM UTC, comment #7: I ran into this when I used a linter for Java (which takes quite a few milliseconds) and split my Tmux pane at the same time.
|
Filips Romāns <fjr> |
Thu 06 May 2021 11:35:26 AM UTC, comment #6: Fixed in git, commit 4712d464, by blocking SIGWINCH at the right moment.
|
Benno Schulenberg <bens> |
Thu 06 May 2021 11:24:35 AM UTC, comment #5: The problem is the same as it was with bug #56011 from two years ago: the signal causes read() to return. (But how this can lead to 'pointer' taking a step backwards, I don't understand.)
|
Benno Schulenberg <bens> |
Thu 06 May 2021 10:50:34 AM UTC, comment #4: Running the recipe with valgrind gives:
|
Benno Schulenberg <bens> |
Thu 06 May 2021 10:47:29 AM UTC, comment #3: Compiling with -fsanitizer=address produces:
|
Benno Schulenberg <bens> |
Thu 06 May 2021 10:41:09 AM UTC, comment #2: Oh, wait, I misunderstood. It is the 'sleep 5' that is the key element. With a little script like this:
and then resizing while the linting script is busy sleeping, I can now reproduce the crash: when the sleep finishes and nano wants to continue. |
Benno Schulenberg <bens> |
Thu 06 May 2021 10:17:00 AM UTC, comment #1: Thanks for reporting. However, I cannot reproduce.
Then I ran 'src/nano +1 README' and typed M-B to invoke the linter. The cursor is put on line 7 and the status bar says: [ "README:7: mistake" README ]. Then I've tried resizing the terminal in various ways, but nothing happens: nano keeps on running and waiting for input, and I can exit normally (^C ^X).
|
Benno Schulenberg <bens> |
Thu 06 May 2021 09:16:21 AM UTC, original submission:
Tested with fresh build of version 5.7 and trivial nanorc. When the linter produces at least one message and the terminal is resized while the linter is running, nano will crash with the following message:
|
Filips Romāns <fjr> |
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 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2021-06-16 | bens | Open/Closed | Open | Closed | |
2021-05-06 | bens | Status | In Progress | Fixed | |
2021-05-06 | bens | Status | None | In Progress | |
Summary | Nano crashes with code 6 when terminal resized during linter | nano crashes when terminal is resized while linter is running | |||
2021-05-06 | bens | Status | Need Info | None | |
2021-05-06 | bens | Severity | 3 - Normal | 4 - Important | |
Status | None | Need Info | |||
Assigned to | None | bens |
Powered by Savane 3.13-d3ae.
Corresponding source code
The fix was released in nano-5.8. Thanks again for reporting!