Re: valgrind leak I can't find

Liste des GroupesRevenir à cl c 
Sujet : Re: valgrind leak I can't find
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.c
Date : 22. Aug 2024, 17:20:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240822081732.909@kylheku.com>
References : 1
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-08-22, Mark Summerfield <mark@qtrac.eu> wrote:
The first leak in the detailed report is this:
>
==18005== 5 bytes in 1 blocks are definitely lost in loss record 1 of 25
==18005==    at 0x48407B4: malloc (vg_replace_malloc.c:381)
==18005==    by 0x49E38E9: strdup (strdup.c:42)
==18005==    by 0x10CAD4: vec_str_tests (vec_str_test.c:77)
==18005==    by 0x109346: main (cx_test.c:26)
>
vec_str_test.c:77 is:
>
    vec_str_insert(&v1, 4, strdup("beta"));
>
The reason I use strdup() is because my VecStr type takes ownership of
the strings it holds.

Does your program free the vector before terminating, including
iterating over the string elements and freeing them individually?

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Date Sujet#  Auteur
22 Aug 24 * valgrind leak I can't find26Mark Summerfield
22 Aug 24 +- Re: valgrind leak I can't find1Ben Bacarisse
22 Aug 24 +* Re: valgrind leak I can't find11Bart
22 Aug 24 i`* Re: valgrind leak I can't find10Thiago Adams
22 Aug 24 i `* Re: valgrind leak I can't find9Annada Behera
22 Aug 24 i  +* Naming conventions (was Re: valgrind leak I can't find)6Janis Papanagnou
22 Aug 24 i  i`* Re: Naming conventions (was Re: valgrind leak I can't find)5Thiago Adams
23 Aug 24 i  i +- Re: Naming conventions (was Re: valgrind leak I can't find)1Janis Papanagnou
23 Aug 24 i  i `* Re: Naming conventions (was Re: valgrind leak I can't find)3James Kuyper
25 Aug 24 i  i  `* Re: Naming conventions (was Re: valgrind leak I can't find)2Janis Papanagnou
26 Aug 24 i  i   `- Re: Naming conventions (was Re: valgrind leak I can't find)1James Kuyper
24 Aug 24 i  `* Re: valgrind leak I can't find2Blue-Maned_Hawk
24 Aug 24 i   `- Re: valgrind leak I can't find1Keith Thompson
22 Aug 24 +- Re: valgrind leak I can't find1Stefan Ram
22 Aug 24 +- Re: valgrind leak I can't find1Ike Naar
22 Aug 24 +- Re: valgrind leak I can't find1Stefan Ram
22 Aug 24 +- Re: valgrind leak I can't find1Kaz Kylheku
22 Aug 24 `* Re: valgrind leak I can't find9Mark Summerfield
22 Aug 24  +- Re: valgrind leak I can't find1Kaz Kylheku
23 Aug 24  +* Re: valgrind leak I can't find6Stefan Ram
23 Aug 24  i`* Re: valgrind leak I can't find5Bart
23 Aug 24  i `* Re: valgrind leak I can't find4Michael S
23 Aug 24  i  +* Re: valgrind leak I can't find2James Kuyper
23 Aug 24  i  i`- Re: valgrind leak I can't find1James Kuyper
23 Aug 24  i  `- Re: valgrind leak I can't find1David Brown
23 Aug 24  `- Re: valgrind leak I can't find1James Kuyper

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal