Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: audio/moc dumps core in libcurses
On Mon, Jan 30, 2017 at 11:02:05 +0000, Roy Marples wrote:
> On 30/01/2017 04:22, coypu%SDF.ORG@localhost wrote:
> > I've applied a patch to audio/moc. It works on my end now.
> > It was attempting set_escdelay (25); very early, before setting
> > up a window.
> >
> > On nbcurses it was:_cursesi_screen->ESCDELAY = escdelay;
> > which was a null deref.
> >
> > for ncurses, it was returning an error, but it was ignoring it.
>
> We have a lot of similar functions which operate without checking the
> terminal has been setup or not.
> It *IS* a programming error, so it's probably best to use an assert
> rather than simply returning ERR.
>
> Anyone have any stronger opinions on this before I add asserts
> liberally to our curses?
It was my impression that the traditional interface was for a program
to just set global ESCDELAY variable directly and that set_escdelay()
was a wrapper function intended to provide internal locking for
multithreaded programs. I.e. it's not a setter that hides where and
how the value is stored.
From a quick look at the code in current it looks like you've broken
this for existing programs that just set the ESCDELAY variable
directly, since the new code ignores the variable.
-uwe
Home |
Main Index |
Thread Index |
Old Index