This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [pushed] PR tui/16138, PR tui/17519, and misc failures to initialize the terminal


Hi Simon,

On 11/03/2014 09:37 PM, Simon Marchi wrote:

> I just noticed this causes a segfault on SLED11, which is somewhat old. "zypper info libncurses5" gives version "5.6-90.55".
> 
> Old ncurses' newterm doesn't like it when we pass NULL for ofp and ifp (the last two parameters). Passing NULL to name (the first parameter) is ok though.
> 
> I just checked the difference in the source, and new ncurses' newterm has this:
> 
> FILE *_ofp = ofp ? ofp : stdout;
> FILE *_ifp = ifp ? ifp : stdin;
> 
> while the old one does not, which explains the difference in behavior. I tried to change the line for:
> 
> s = newterm (NULL, stdout, stdin);
> 
> and everything seems to work as usual.
> 
> Do you want me to submit a patch, or are you going to take care of it yourself?

Sounds like an obvious fix then.  If you could submit/push a patch, I'd
appreciate it.  Just be sure to include the info above in the commit
log.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]