bug-ncurses
[Top][All Lists]
Advanced

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

Re: ANN: ncurses-6.0-20170624


From: Thomas Dickey
Subject: Re: ANN: ncurses-6.0-20170624
Date: Sun, 25 Jun 2017 19:35:58 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Jun 25, 2017 at 07:03:34PM -0400, Thomas Dickey wrote:
> Actually, just reading the configure options in your previous mail, I didn't
> see (yet) a significant difference between your/my configurations.  But today 
> I
> added a test-script with your settings, and given TERM=unknown, can see a
> problem to investigate (perhaps the one that your traceback/report shows).

For example, getting rid of the "free(TCB)" calls fixes the problem
which I can see:

diff -u -r1.56 tinfo_driver.c
--- tinfo_driver.c      2017/06/24 19:54:16     1.56
+++ tinfo_driver.c      2017/06/25 23:24:31
@@ -214,17 +214,17 @@
             || (VALID_STRING(cursor_down) && VALID_STRING(cursor_home)))
            && VALID_STRING(clear_screen)) {
            _nc_free_termtype2(&TerminalType(termp));
-           free(TCB);
+           //free(TCB);
            ret_error1(TGETENT_YES, "terminal is not really generic.\n", tname);
        } else {
            _nc_free_termtype2(&TerminalType(termp));
-           free(TCB);
+           //free(TCB);
            ret_error1(TGETENT_NO, "I need something more specific.\n", tname);
        }
     }
     if (hard_copy) {
        _nc_free_termtype2(&TerminalType(termp));
-       free(TCB);
+       //free(TCB);
        ret_error1(TGETENT_YES, "I can't handle hardcopy terminals.\n", tname);
     }

(setting TERM=unknown hits the second of those - I'll have to study
the difference in configuration to see why it worked yesterday for me).

With that change, valgrind says there's a leak from this call, a little
before in tinfo_driver.c:

        #if NCURSES_EXT_NUMBERS
                _nc_export_termtype2(&termp->type, &TerminalType(termp));
        #endif

which probably could be fixed by adding

        #if NCURSES_EXT_NUMBERS
                _nc_free_termtype(&termp->type);
        #endif

(where the commented-out "free(TCB)" lines are).

-- 
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]