Opened on 11/30/14 at 04:18:49
Closed on 12/03/14 at 00:27:25
#2203 closed defect (fixed)
edit command results in crash in shell after save and exit.
Reported by: | Chris Johns | Owned by: | Chris Johns |
---|---|---|---|
Priority: | highest | Milestone: | 4.11 |
Component: | shell | Version: | 4.11 |
Severity: | blocker | Keywords: | shell edit |
Cc: | Blocked By: | ||
Blocking: |
Description
To repeat run the fileio example in the SPARC simulator, select shell and log in as root. Then:
cd scripts
edit js
Move down a few lines and enter characters and lines then save and exit. At the shell promt enter 'ls' and you will get an unexpected trap.
Change History (5)
comment:1 Changed on 11/30/14 at 22:35:02 by Chris Johns
Owner: | set to Chris Johns |
---|---|
Status: | new → accepted |
comment:2 Changed on 11/30/14 at 22:43:13 by Chris Johns
comment:3 Changed on 12/01/14 at 14:33:36 by Gedare Bloom
When you say "from the start", do you mean since the initial shell code came in? If so the Version should be set back a bit further, and the milestone adjusted to 4.9.5
comment:4 Changed on 12/01/14 at 21:14:58 by Chris Johns
I was meaning the commit that added the edit.c code.
comment:5 Changed on 12/03/14 at 00:27:25 by Chris Johns
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed.
Note: See
TracTickets for help on using
tickets.
I have found the shell's command list is corrupted while editing a file. A bisect indicates the bug has been in the code from the start and I suspect a movement of code or data has made it appear.
The variable to watch is 'rtems_shell_first_cmd'. If you open the scripts/js file and use the arrow key and move to the bottom of the file then up arrow on the third press (I think) gdb shows in edit.c 'up' entry:
1: rtems_shell_first_cmd = (rtems_shell_cmd_t *) 0x209e388
and after running the up code it becomes:
1: rtems_shell_first_cmd = (rtems_shell_cmd_t *) 0x1b
This is in the SIS simulator. This bug also happens on a zynq. I have not been able to set a watch point on the write in gdb running the SIS and have it break. Things get a little weird with stdout/stdin when the watch point is active.