[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] readline and history: order of libraries

From: Chet Ramey
Subject: Re: [Bug-readline] readline and history: order of libraries
Date: Wed, 17 Jun 2009 21:59:11 -0400
User-agent: Thunderbird (Macintosh/20090302)

lusth wrote:
> version: libreadline.so.5, libhistory.so.5
> machines: intel i386, AMD 64
> OS: ubuntu 9.04
> compilation flags: none
> description:
>    if readline/history program is compiled like so:
>        gcc prog.c -lhistory -lreadline
>    the program seg faults when attempting to recover
>    a string stored in the history. Program:
>      #include <readline/readline.h>
>    #include <readline/history.h>
>    int main()
>        {
>         add_history("whoa");
>         (void) readline("enter: "); #user enters up-arrow here
>         return 0;
>         }
> fix: reverse order of libraries:
>        gcc prog.c -lreadline -lhistory
> comment: order of libraries should not matter since readline and
> history are closely coupled.

I can reproduce this using the debian versions of the libraries, but
I can't get a stack traceback with enough useful information to see
where the problem might be.

I can't reproduce it using static or dynamic libraries built from
readline-5.2.013 source.

``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]