bug-ncurses
[Top][All Lists]
Advanced

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

Re: ncurses 20170617 causes SIGTRAP on Windows 10 / MinGW-w64


From: Thomas Dickey
Subject: Re: ncurses 20170617 causes SIGTRAP on Windows 10 / MinGW-w64
Date: Mon, 19 Jun 2017 05:28:08 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jun 19, 2017 at 05:39:54AM +0000, Allen Hewes wrote:
> On 6/18/2017 18:28, Thomas Dickey wrote:
> > On Sun, Jun 18, 2017 at 04:41:33PM +0000, Allen Hewes wrote:
> >> Hi Thomas,
> >>
> >> Thanks for the new snapshot 20170617! It does fix the empty data
> >> structure member but now it looks like it's trying to free some memory
> >> that isn't allocated:
> > 
> > thanks - oddly enough, that path worked for me yesterday, in testing:
> > 
> > I setup the term-driver configuration first on Debian, used valgrind
> > to polish off leaks (and the latest problem is in one of those fixes).
> > Then I build/ran my test programs in mingw64 (no problems seen).
> > 
> > I'll see what I can glean from the trace.
> > 
> > The changes to curses.priv.h were the fix that I recalled.  What I
> > think I'm looking for is a similar/overlooked path which deals with
> > the different structures.
> > 
> Hi Thomas,
> 
> I'm not sure if I'm helping (or not) or chasing after wild geese:

It's probably helpful :-)

> I looked at del_curterm() and it's the free(termp) [L168] but I can't
> determine what del_curterm() does per se... Or why _nc_free_termtype2()
> would be called after a call to del_curterm(), termp is "gone" isn't it?
> In the 20170325 version of the code, free(termp) is in del_curterm() but
> the calls to _nc_free_termtype2() are not in tinfo_driver.c.

grep shows me this (disregarding ifdefs):

curses.priv.h:2147:#define _nc_free_termtype2(t) _nc_free_termtype(t)
tinfo/entries.c:110:    _nc_free_termtype2(&(_nc_head->tterm));
tinfo/free_ttype.c:79:_nc_free_termtype2(TERMTYPE2 *ptr)
tinfo/lib_cur_term.c:150:       _nc_free_termtype2(&TerminalType(termp));
tinfo/lib_setup.c:724:      _nc_free_termtype2(&TerminalType(termp));
tinfo/lib_setup.c:749:          _nc_free_termtype2(&TerminalType(termp));
tinfo/lib_setup.c:752:          _nc_free_termtype2(&TerminalType(termp));
tinfo/read_entry.c:447:         _nc_free_termtype2(ptr);
tinfo/tinfo_driver.c:182:           _nc_free_termtype2(&TerminalType(termp));
tinfo/tinfo_driver.c:185:           _nc_free_termtype2(&TerminalType(termp));
tinfo/tinfo_driver.c:218:           _nc_free_termtype2(&TerminalType(termp));
tinfo/tinfo_driver.c:221:           _nc_free_termtype2(&TerminalType(termp));
tinfo/tinfo_driver.c:226:       _nc_free_termtype2(&TerminalType(termp));

I'm working (thought I was done...) to replace "TERMTYPE" with "TERMTYPE2",
but have to maintain the former for interface compatibility.  The
TerminalType() macro hides most of that, by making ncurses internally
use the latter when it's appropriate (ABI 5).  There are a few import/export
calls done at initialization to provide data for legacy applications that
rely upon the TERMTYPE data.

Most of the "TERMTYPE" and "TERMTYPE2" structures aren't used in the
MinGW console driver, but are carried along to simplify the interface.
 
> Here's my configure:
>       --without-ada
>       --with-cxx
>       --without-shared
>       --without-pthread
>       --enable-pc-files
>       --disable-rpath
>       --enable-colorfgbg
>       --enable-ext-colors
>       --enable-ext-mouse
>       --disable-symlinks
>       --enable-warnings
>       --enable-assertions
>       --disable-home-terminfo
>       --enable-database
>       --enable-sp-funcs
>       --enable-term-driver
>       --enable-interop
>       --enable-widec
>       --with-trace

So far I've focused on just testing ncurses - I may have to build gdb,
which is a bigger chunk of time (unless the problem's obvious).

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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