bug-ncurses
[Top][All Lists]
Advanced

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

Re: Valgrind reports possibly lost memory


From: Steve Litt
Subject: Re: Valgrind reports possibly lost memory
Date: Mon, 30 May 2022 15:17:47 -0400

Thomas Dickey said on Mon, 30 May 2022 06:01:04 -0400

>On Mon, May 30, 2022 at 10:22:21AM +0200, TheJackiMonster wrote:
>> Hi,
>> 
>> I'm currently working on a messaging application using ncurses and
>> during testing for memory leaks with valgrind I noticed reports from
>> ncurses.
>> 
>> To make sure there's nothing coming from my applications code, I
>> created a very short program to test around.
>> 
>> test.c:
>> 
>>    #include <stdlib.h>
>>    #include <curses.h>
>>    
>>    int main(int argc, const char** argv)
>>    {
>>        WINDOW *win;
>>        win = initscr();
>>        endwin();
>>        return 0;  
>
>That's an FAQ:
>
>https://invisible-island.net/ncurses/ncurses.faq.html#config_leaks

The valgrind issue is a serious problem because you can't tell whether
the leak is in ncurses or the code you wrote. Compiling a separate
ncurses without leak means having two different ncurses', which is a
problem given that so much Linux software contains ncurses.

It would be wonderful if a single ncurses could operate either way at
runtime, with an environment variable or a command line argument or the
existence of a file, or something in a configuration file, or anything
else detectable at runtime.

SteveT

Steve Litt 
March 2022 featured book: Making Mental Models: Advanced Edition
http://www.troubleshooters.com/mmm



reply via email to

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