GNU nano - Bugs: bug #56023, savefile (^S) says...
You are not allowed to post comments on this tracker with your current authentication level.
bug #56023: savefile (^S) says "[Cancelled]" in nano-4.0 on an ARM
Submitter: | easyaspi314 <easyaspi314> | ||
Submitted: | Thu 28 Mar 2019 07:47:47 PM UTC | ||
Severity: | 4 - Important | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Tue 16 Apr 2019 08:45:57 AM UTC, comment #14: |
Benno Schulenberg <bens> |
Wed 03 Apr 2019 02:37:46 PM UTC, comment #13: Or, maybe, you could try compiling with more compilers than just GCC...
|
easyaspi314 <easyaspi314> |
Wed 03 Apr 2019 01:03:36 PM UTC, comment #12: (For completeness: nor with 'export MALLOC_PERTURB_=234' nor with 'export GLIBC_TUNABLES="glibc.malloc.perturb=234"', nor with several other numbers, can I make ^S fail on a nano from shortly before commit 7ad232d7. Tested on three machines. So, even with malloc perturbation, I wouldn't have caught my mistake.) |
Benno Schulenberg <bens> |
Sun 31 Mar 2019 10:02:21 PM UTC, comment #11: My x86 (32bit) Gentoo machine also has this problem. |
Brand Huntsman <brand> |
Sun 31 Mar 2019 06:24:06 PM UTC, comment #10: Of the machines that I tried nano on (two 64-bit, and three 32-bit), none of them show the problem. And as far as I know none of them initialize memory to zero.
|
Benno Schulenberg <bens> |
Sun 31 Mar 2019 04:43:27 PM UTC, comment #9: I added a logger and choice is indeed garbage. It just happens to usually be positive on my Mac.
|
easyaspi314 <easyaspi314> |
Sun 31 Mar 2019 03:40:33 PM UTC, comment #8: Well either way it is mucking with UB so it is incorrect.
|
easyaspi314 <easyaspi314> |
Sun 31 Mar 2019 03:25:39 PM UTC, comment #7: For the record, this problem was not limited to ARM chips, despite the commit message and the recently-changed subject here. I'm running x86_64 (Slackware-current) and was seeing this problem too. Maybe your x86_64 systems are patched to initialize things to zero by default, but not everyone's are. |
David Lawrence Ramsey <dolorous> |
Sun 31 Mar 2019 11:19:48 AM UTC, comment #6: Applied and pushed to master, commit 7ad232d7.
|
Benno Schulenberg <bens> |
Sat 30 Mar 2019 10:36:46 AM UTC, comment #5: Ow. I had seen only the original post, not all the activity afterward. Thanks for the patch, will apply it tomorrow, first some other things to do. |
Benno Schulenberg <bens> |
Thu 28 Mar 2019 10:34:44 PM UTC, comment #4: Here is the patch. It sets response and choice to zero.
|
easyaspi314 <easyaspi314> |
Thu 28 Mar 2019 10:02:35 PM UTC, comment #3: Exactly. For the record, this was broken back on Feb 20 by commit 0f9d60a. When that commit split up one variable into two, the initialization of the original variable was lost. |
David Lawrence Ramsey <dolorous> |
Thu 28 Mar 2019 09:21:13 PM UTC, comment #2: Wait, Clang literally pointed out the bug for me.
Clang clearly doesn't like this code.
|
easyaspi314 <easyaspi314> |
Thu 28 Mar 2019 08:41:47 PM UTC, comment #1: Update: Just updated Nano on my MacBook to 4.0 from Homebrew and it is not affected.
|
easyaspi314 <easyaspi314> |
Thu 28 Mar 2019 07:47:47 PM UTC, original submission:
Platform:
|
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 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2019-04-16 | bens | Open/Closed | Open | Closed | |
2019-04-03 | easyaspi314 | Attached File | - | Added pvs.log, #46710 | |
Attached File | - | Added cppcheck.log, #46711 | |||
Attached File | - | Added scan-build.log, #46712 | |||
2019-03-31 | bens | Severity | 3 - Normal | 4 - Important | |
Status | In Progress | Fixed | |||
Assigned to | None | bens | |||
Summary | ^S/savefile in Nano 4.0: "[Cancelled]" | savefile (^S) says "[Cancelled]" in nano-4.0 on an ARM | |||
2019-03-30 | bens | Status | None | In Progress | |
2019-03-28 | easyaspi314 | Attached File | - | Added 0001-Fix-uninitialized-variable-usage.patch, #46658 |
Powered by Savane 3.13-d3ae.
Corresponding source code
The fix has been released in 4.1. Thanks for reporting.