Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 669 - ncurses crashes on simple test program
Summary: ncurses crashes on simple test program
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: ncurses
Version: 1.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Preston Brown
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-01-02 17:27 UTC by jehamby
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-01-04 17:47:59 UTC


Attachments (Terms of Use)

Description jehamby 1999-01-02 17:27:50 UTC
I'm using glibc-2.0.108-0.981221, ncurses-4.2-11,
egcs-1.1.1-2, and kernel 2.2.0-pre2.  This simple ncurses
program crashes:

#include <ncurses.h>

main() {
  initscr();
  return 0;
}

"make menuconfig" in the Linux kernel also crashes for the
exact same reason.  Here's GDB output:

Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libncurses.so.4...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  0x400a821f in _IO_fflush (fp=0x401386c0) at
iofflush.c:41
iofflush.c:41: No such file or directory.
(gdb) bt
#0  0x400a821f in _IO_fflush (fp=0x401386c0) at
iofflush.c:41
#1  0x40043f9e in _nc_set_buffer ()
#2  0x400364db in _nc_setupscreen ()
#3  0x4003433f in newterm ()
#4  0x4003195c in initscr ()
#5  0x8048598 in main () at ncurses-test.c:4
#6  0x40070827 in __libc_start_main (main=0x8048590 <main>,
argc=1, argv=0xbffffc54,
    init=0x8048460 <_init>, fini=0x80485dc <_fini>,
rtld_fini=0x4000a710 <_dl_fini>,
    stack_end=0xbffffc4c) at
../sysdeps/generic/libc-start.c:78

(gdb) print *fp
$1 = {_flags = -72540028, _IO_read_ptr = 0x0, _IO_read_end =
0x0, _IO_read_base = 0x0,
  _IO_write_base = 0x0, _IO_write_ptr = 0x0, _IO_write_end =
0x0, _IO_buf_base = 0x0,
  _IO_buf_end = 0x0, _IO_save_base = 0x0, _IO_backup_base =
0x0, _IO_save_end = 0x0,
  _markers = 0x0, _chain = 0x40138640, _fileno = 1, _blksize
= 0, _old_offset = -1,
  _cur_column = 0, _vtable_offset = 0 '\000', _shortbuf =
"", _lock = 0x40138690,
  _offset = 1075021248, _unused2 = {0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, -72540026, 0, 0,
    0, 0}}

Comment 1 Pekka Pietikäinen 1999-01-03 16:03:59 UTC
Same as bug # 546.
Fixed by rebuilding ncurses under glibc-2.0.108
(or fixing the compatibility code in glibc-2.0.108,
since it obviously is quite broken :( )

Comment 2 Bill Nottingham 1999-01-04 15:20:59 UTC
Recompile ncurses against glibc2.1. Does that help?

Comment 3 Cristian Gafton 1999-01-04 17:47:59 UTC
ncurses and/or readlne libs were not updated to relasess built against
glibc 2.1. libio is not backwards compatible. Yet.


Note You need to log in before you can comment on or make changes to this bug.