Mantis - ncurses
Viewing Issue Advanced Details
2122 packaging block always 2007-01-23 14:03 2009-03-20 11:23
michaelk  
dam  
normal  
closed  
fixed  
none    
none  
0002122: ncurses apps crash in _nc_read_entry(), Illegal instruction on AMD K6-II
Hi!

ncurses version is 5.5,REV=2006.02.10

All applications using ncurses (vim, gpg and probably many more) are crashing here during startup on my AMD K6-II, possibly because of CPU optimization:

havsule:/tmp > gdb /opt/csw/bin/reset
GNU gdb 6.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type \"show copying\" to see the conditions.
There is absolutely no warranty for GDB. Type \"show warranty\" for details.
This GDB was configured as \"i386-pc-solaris2.8\"...(no debugging symbols found)...
(gdb) run
Starting program: /opt/csw/bin/reset
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGILL, Illegal instruction.
0xd2f851da in _nc_read_entry () from /opt/csw/lib/libncurses.so.5
(gdb) disass 0xd2f851da
Dump of assembler code for function _nc_read_entry:
[...]
0xd2f851d5 <_nc_read_entry+1358>: lea 0x1(%edx),%eax
0xd2f851d8 <_nc_read_entry+1361>: cmp %ecx,%eax
0xd2f851da <_nc_read_entry+1363>: cmovae 0x41c(%esp),%edx
0xd2f851e2 <_nc_read_entry+1371>: xor %eax,%eax
0xd2f851e4 <_nc_read_entry+1373>: mov %edx,%edi

according to http://docs.sun.com/app/docs/doc/817-5477/6mkuavhri?a=view [^]
CMOVA is only valid for AMD64

havsule:/tmp > isainfo -v
32-bit i386 applications
        amd_3dnow mmx cx8 tsc fpu
Issue History
2009-02-04 12:09 dam Note Added: 0005515
2009-02-04 12:09 dam Status new => resolved
2009-02-04 12:09 dam Resolution open => fixed
2009-02-04 12:09 dam Assigned To => dam
2009-03-20 11:23 dam Note Added: 0005683
2009-03-20 11:23 dam Status resolved => closed

Notes
(0005515)
dam   
2009-02-04 12:09   
This should be fixed in ncurses 5.7 in current/
(0005683)
dam   
2009-03-20 11:23   
Fixed in 5.7,REV=2009.01.12