[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ncurses 20170617 causes SIGTRAP on Windows 10 / MinGW-w64
From: |
Allen Hewes |
Subject: |
Re: ncurses 20170617 causes SIGTRAP on Windows 10 / MinGW-w64 |
Date: |
Mon, 19 Jun 2017 05:39:54 +0000 |
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:
In 20170617 code:
180 NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx termp);
(gdb) print *termp
$1 = {type = {term_names = 0x0, str_table = 0x0, Booleans = 0x0, Numbers
= 0x0, Strings = 0x0, ext_str_table = 0x0,
ext_Names = 0x0, num_Booleans = 0, num_Numbers = 0, num_Strings = 0,
ext_Booleans = 0, ext_Numbers = 0, ext_Strings = 0},
Filedes = 0, Ottyb = {c_iflag = 0, c_oflag = 0, c_cflag = 0, c_lflag =
0, c_line = 0 '\000', c_cc = '\000' <repeats 17 times>,
c_ispeed = 0, c_ospeed = 0}, Nttyb = {c_iflag = 0, c_oflag = 0,
c_cflag = 0, c_lflag = 0, c_line = 0 '\000',
c_cc = '\000' <repeats 17 times>, c_ispeed = 0, c_ospeed = 0},
_baudrate = 0, _termname = 0x0, type2 = {term_names = 0x0,
str_table = 0x0, Booleans = 0x0, Numbers = 0x0, Strings = 0x0,
ext_str_table = 0x0, ext_Names = 0x0, num_Booleans = 0,
num_Numbers = 0, num_Strings = 0, ext_Booleans = 0, ext_Numbers = 0,
ext_Strings = 0}}
(gdb) n
181 if (status == TGETENT_ERR) {
(gdb) print *termp
$2 = {type = {term_names = 0x15849b30 "P\001,\025", str_table =
0x15844780 "@\230,\025",
Booleans = 0xfeeefeeefeeefeee <error: Cannot access memory at
address 0xfeeefeeefeeefeee>, Numbers = 0xfeeefeeefeeefeee,
Strings = 0xfeeefeeefeeefeee, ext_str_table = 0xfeeefeeefeeefeee
<error: Cannot access memory at address 0xfeeefeeefeeefeee>,
ext_Names = 0xfeeefeeefeeefeee, num_Booleans = 65262, num_Numbers =
65262, num_Strings = 65262, ext_Booleans = 65262,
ext_Numbers = 65262, ext_Strings = 65262}, Filedes = -274, Ottyb =
{c_iflag = 4277075694, c_oflag = 4277075694,
c_cflag = 4277075694, c_lflag = 4277075694, c_line = -18 'î', c_cc =
"_î_î_î_î_î_î_î_î_î", c_ispeed = 4277075694,
c_ospeed = 4277075694}, Nttyb = {c_iflag = 4277075694, c_oflag =
4277075694, c_cflag = 4277075694, c_lflag = 4277075694,
c_line = -18 'î', c_cc = "_î_î_î_î_î_î_î_î_î", c_ispeed =
4277075694, c_ospeed = 4277075694}, _baudrate = -17891602,
_termname = 0xfeeefeeefeeefeee <error: Cannot access memory at address
0xfeeefeeefeeefeee>, type2 = {
term_names = 0xfeeefeeefeeefeee <error: Cannot access memory at
address 0xfeeefeeefeeefeee>,
str_table = 0xfeeefeeefeeefeee <error: Cannot access memory at
address 0xfeeefeeefeeefeee>,
Booleans = 0xfeeefeeefeeefeee <error: Cannot access memory at
address 0xfeeefeeefeeefeee>, Numbers = 0xfeeefeeefeeefeee,
Strings = 0xfeeefeeefeeefeee, ext_str_table = 0xfeeefeeefeeefeee
<error: Cannot access memory at address 0xfeeefeeefeeefeee>,
ext_Names = 0xfeeefeeefeeefeee, num_Booleans = 65262, num_Numbers =
65262, num_Strings = 65262, ext_Booleans = 65262,
ext_Numbers = 65262, ext_Strings = 65262}}
In 20170325 code:
180 NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx termp);
(gdb) print *termp
$5 = {type = {term_names = 0x0, str_table = 0x0, Booleans = 0x0, Numbers
= 0x0, Strings = 0x0, ext_str_table = 0x0,
ext_Names = 0x0, num_Booleans = 0, num_Numbers = 0, num_Strings = 0,
ext_Booleans = 0, ext_Numbers = 0, ext_Strings = 0},
Filedes = 0, Ottyb = {c_iflag = 0, c_oflag = 0, c_cflag = 0, c_lflag =
0, c_line = 0 '\000', c_cc = '\000' <repeats 17 times>,
c_ispeed = 0, c_ospeed = 0}, Nttyb = {c_iflag = 0, c_oflag = 0,
c_cflag = 0, c_lflag = 0, c_line = 0 '\000',
c_cc = '\000' <repeats 17 times>, c_ispeed = 0, c_ospeed = 0},
_baudrate = 0, _termname = 0x0}
(gdb) n
181 if (status == TGETENT_ERR) {
(gdb) print *termp
$6 = {type = {term_names = 0x15629ae0 "P\001b\025", str_table =
0x154e2d10 "@\230b\025",
Booleans = 0xfeeefeeefeeefeee <error: Cannot access memory at
address 0xfeeefeeefeeefeee>, Numbers = 0xfeeefeeefeeefeee,
Strings = 0xfeeefeeefeeefeee, ext_str_table = 0xfeeefeeefeeefeee
<error: Cannot access memory at address 0xfeeefeeefeeefeee>,
ext_Names = 0xfeeefeeefeeefeee, num_Booleans = 65262, num_Numbers =
65262, num_Strings = 65262, ext_Booleans = 65262,
ext_Numbers = 65262, ext_Strings = 65262}, Filedes = -274, Ottyb =
{c_iflag = 4277075694, c_oflag = 4277075694,
c_cflag = 4277075694, c_lflag = 4277075694, c_line = -18 'î', c_cc =
"_î_î_î_î_î_î_î_î_î", c_ispeed = 4277075694,
c_ospeed = 4277075694}, Nttyb = {c_iflag = 4277075694, c_oflag =
4277075694, c_cflag = 4277075694, c_lflag = 4277075694,
c_line = -18 'î', c_cc = "_î_î_î_î_î_î_î_î_î", c_ispeed =
4277075694, c_ospeed = 4277075694}, _baudrate = -17891602,
_termname = 0xfeeefeeefeeefeee <error: Cannot access memory at address
0xfeeefeeefeeefeee>}
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.
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
/allen
signature.asc
Description: OpenPGP digital signature