glibc breaks readline
martin@mira.isdn.cs.tu-berlin.de
martin@mira.isdn.cs.tu-berlin.de
Thu Apr 1 00:00:00 GMT 1999
>Submitter-Id: net
>Originator: Martin v. Loewis
>Organization:
>Confidential: no
>Synopsis: After installing glibc 2.1.109, programs can't be linked with readlin
>Severity: serious
>Priority: high
>Category: libc
>Class: sw-bug
>Release: libc-2.0.109
>Environment:
Host type: i586-pc-linux-gnu
System: Linux mira 2.2.0-pre1 #2 Fre Jan 1 19:14:18 CET 1999 i586 unknown
Architecture: i586
Addons: crypt linuxthreads
Build CC: gcc
Compiler version: egcs-2.91.60 19981201 (egcs-1.1.1 release)
Kernel headers: 2.2.0-pre1
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: no
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio
>Description:
Installing glibc 2.1.109 on a Redhat 5.2 system renders readline
unusable. Programs compiled on such a installation and linked with
libc and readline will crash.
Programs that had been compiled with glibc 2.0 continue to work.
>How-To-Repeat:
Install glibc on a Redhat 5.2 system.
Install Python 1.5.2 (or any other 1.5.x) on the same system, enable
readline in Modules/setup. Executing the resulting interpreter will
give the following traceback in gdb
#0 0x402beb41 in _IO_fflush (fp=0x40350e00) at iofflush.c:41
#1 0x40027728 in rl_prep_terminal ()
#2 0x4002229f in readline ()
#3 0x80859e3 in call_readline (prompt=0x80ef8ac ">>> ") at ./readline.c:283
#4 0x8052d16 in PyOS_Readline (prompt=0x80ef8ac ">>> ") at myreadline.c:148
#5 0x8051df4 in tok_nextc (tok=0x80ef918) at tokenizer.c:216
#6 0x80523b0 in PyTokenizer_Get (tok=0x80ef918, p_start=0xbffff5ec,
p_end=0xbffff5f0) at tokenizer.c:469
#7 0x8051af2 in parsetok (tok=0x80ef918, g=0x80bd620, start=256,
err_ret=0xbffff650) at parsetok.c:177
#8 0x80519d3 in PyParser_ParseFile (fp=0x40350a60,
filename=0x80a36e7 "<stdin>", g=0x80bd620, start=256,
ps1=0x80ef8ac ">>> ", ps2=0x80ef8ec "... ", err_ret=0xbffff650)
at parsetok.c:120
#9 0x805d34b in PyRun_InteractiveOne (fp=0x40350a60,
filename=0x80a36e7 "<stdin>") at pythonrun.c:509
#10 0x805d287 in PyRun_InteractiveLoop (fp=0x40350a60,
filename=0x80a36e7 "<stdin>") at pythonrun.c:471
#11 0x805d1e7 in PyRun_AnyFile (fp=0x40350a60, filename=0x80a36e7 "<stdin>")
at pythonrun.c:448
#12 0x8051804 in Py_Main (argc=1, argv=0xbffff824) at main.c:286
#13 0x8051328 in main (argc=1, argv=0xbffff824) at python.c:12
#14 0x4028679b in __libc_start_main (main=0x8051318 <main>, argc=1,
argv=0xbffff824, init=0x805025c <_init>, fini=0x80a3040 <_fini>,
rtld_fini=0x4000ab80 <_dl_fini>, stack_end=0xbffff81c)
at ../sysdeps/generic/libc-start.c:78
The crash occurs in a call to _IO_SYNC (fp). *fp looks invalid:
$2 = {_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 = 0x40350d80, _fileno = 1, _blksize = 0,
_old_offset = -1, _cur_column = 0, _vtable_offset = 0 '\000',
_shortbuf = "", _lock = 0x40350dd0, _offset = 1077218560, _unused2 = {0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, -72540026, 0, 0, 0, 0}}
Since /usr/lib/libreadline.so.3 has no debugging information, I have not
investigated this further.
>Fix:
No fix is known. As a work-around, re-installing libreadline might work
(not tested)
More information about the Libc-alpha
mailing list