GNU nano - Bugs: bug #51124, nano segfaults when foregrounded...
You are not allowed to post comments on this tracker with your current authentication level.
bug #51124: nano segfaults when foregrounded after a SIGTSTP
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Fri 26 May 2017 05:43:50 PM UTC | ||
Severity: | 4 - Important | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Wed 31 May 2017 01:13:49 PM UTC, comment #7: |
Benno Schulenberg <bens> |
Tue 30 May 2017 07:51:48 PM UTC, comment #6: It seems to depend on the compilation, on the boot, and on the exact position of the cursor. On a Xubuntu Zesty (ncurses-6.0+20161625) and on an old Ubuntu Lucid (ncurses-5.7), doing a 'src/nano --suspend +1 NEWS', a kill -SIGTSTP and a fg, will cause a SIGHUP/SIGTERM when using the attached "bad" nanorc. And they will work fine (apart from bug #51131) when there is no nanorc at all. On an up-to-date Manjaro, though, (ncurses-6.0+20170429) it is the other way around: without any nanorc it will SIGHUP/SIGTERM, and with the "bad" nanorc (or my normal nanorc) it will work fine.
|
Benno Schulenberg <bens> |
Sun 28 May 2017 06:37:07 PM UTC, comment #5: In my current situation, 2.7.5 can still be foregrounded fine (apart from the cursor being misplaced -- see bug #51131), but foregrounding 2.8.0 (after a SIGTSTP) will result in a SIGHUP/SIGTERM. Weird. Also, after a recent bootup, I do not need any nanorc at all to make a 2.8.4 segfault upon foregrounding (after a SIGTSTP -- using an in-nano ^Z and then a fg works fine).
|
Benno Schulenberg <bens> |
Sun 28 May 2017 12:06:02 PM UTC, comment #4: Another bisect brings me again to 4c566c79. This is ridiculous. |
Benno Schulenberg <bens> |
Sun 28 May 2017 12:00:15 PM UTC, comment #3: I must have done something wrong during bisecting between 2.6.1. and 2.6.2, because the commit that triggers the HUP/TERM is 6f12992c (the addition of option '--wordchars'). It is not fully reproducible, though -- it seems to depend on the compilation. |
Benno Schulenberg <bens> |
Fri 26 May 2017 07:08:36 PM UTC, comment #2: Attached diff is enough to avoid the segfault. But then we would be back to the stutter (sometimes) when switching between buffers when linenumbers are on. That's not what we want.
|
Benno Schulenberg <bens> |
Fri 26 May 2017 06:21:08 PM UTC, comment #1: (Forgot to attach the file. Attached now.)
|
Benno Schulenberg <bens> |
Fri 26 May 2017 05:43:50 PM UTC, original submission:
This is hard to reproduce. Attached is the smallest .nanorc I have been able to reproduce it with so far. Move your /etc/nanorc and ~/.nanorc out of the way, and then copy the attached NNRC to ~/.nanorc. Then run:
|
Benno Schulenberg <bens> |
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 |
---|---|---|---|---|---|
2017-06-26 | bens | Open/Closed | Open | Closed | |
2017-05-31 | bens | Severity | 3 - Normal | 4 - Important | |
Status | None | Fixed | |||
Assigned to | None | bens | |||
2017-05-28 | bens | Attached File | - | Added BT1, #40805 | |
2017-05-26 | bens | Attached File | - | Added avoid-segfault.diff, #40797 | |
Attached File | - | Added draw-content-first.patch, #40798 | |||
2017-05-26 | bens | Attached File | - | Added NNRC, #40795 |
Powered by Savane 3.13-f8d8.
Corresponding source code
Apparenly it is not a good idea to call regenerate_screen() when a signal occurs. Faking a SIGWINCH instead avoids the segfault and the fake SIGHUP/SIGTERM -- it is not a HUP or TERM at all: it is the input routine giving up when it gets too many errors in a row. Argh! The error message should have said that, instead of saying something completely false.
Fixed in git, the first part, a969adf8, and the second part, a2038a9b.