Re: [Valgrind-users] Timer delete

2022-11-13 Thread Paul Floyd
Hi I've done most of the work to get the pthread stack cache turned off with glibc >= 2.34. (see https://bugs.kde.org/show_bug.cgi?id=88). This doesn't help with this example, and it looks to me that this is a problem with libc / rtld. A+ Paul

Re: [Valgrind-users] Timer delete

2022-11-12 Thread Paul Floyd
Yes, the cache disabling is quite hacky, as mentionnd in the doc: "Valgrind disables the cache using some internal knowledge of the glibc stack cache implementation and by examining the debug information of the pthread library. This technique is thus somewhat fragile and might not work f

Re: [Valgrind-users] Timer delete

2022-11-12 Thread Mark Wielaard
On Sat, Nov 12, 2022 at 12:46:41PM +0100, Philippe Waroquiers wrote: > On Sat, 2022-11-12 at 12:21 +0100, Paul Floyd wrote: > > So my conclusion is that there are two problems > > 1. Some cleanup code missing in __libc_freeres that is causing this leak > > (libc problem) > > 2. no-stackcache not w

Re: [Valgrind-users] Timer delete

2022-11-12 Thread Philippe Waroquiers
On Sat, 2022-11-12 at 12:21 +0100, Paul Floyd wrote: > Philiipe wrote: > > Possibly --sim-hints=no-nptl-pthread-stackcache might help (if I > > re-read the manual entry for this sim-hint). > > > As the manpage says, the pthread stackcache stuff is mainly for Helgrind. > > I don't see how

Re: [Valgrind-users] Timer delete

2022-11-12 Thread Paul Floyd
On 11/12/22 01:46, John Reiser wrote: It's a bug (or implementation constraint) in glibc timer. When I run it under valgrind-3.19.0 with glibc-debuginfo and glibc-debugsource installed (2.35-17.fc36.x86_64): [Notice the annotation "LOOK HERE"] ==281161== Command: ./a.out ==281161== --28

Re: [Valgrind-users] Timer delete

2022-11-11 Thread Domenico Panella
 [[snip horrible formatting]] It looks so good. Probably your email client messed up it. Thanks so much for answer. Good job, Domenico Il 12/11/22 01:46, John Reiser ha scritto: On 11/11/22 13:23, Domenico Panella wrote: Operating System: Slackware 15.0 (Current) Kernel Version: 5.19.17 (64-

Re: [Valgrind-users] Timer delete

2022-11-11 Thread John Reiser
On 11/11/22 13:23, Domenico Panella wrote: Operating System: Slackware 15.0 (Current) Kernel Version: 5.19.17 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz A small example: #include [[snip horrible formatting]] It's a bug (or implementation constrain

Re: [Valgrind-users] Timer delete

2022-11-11 Thread Domenico Panella
Operating System: Slackware 15.0 (Current) Kernel Version: 5.19.17 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz A small example: #include #include #include #include #include #include #include #include #include #include #include #include #inclu

Re: [Valgrind-users] Timer delete

2022-11-11 Thread Philippe Waroquiers
On Fri, 2022-11-11 at 18:13 +0100, Paul Floyd wrote: > > On 11/11/22 17:47, Domenico Panella wrote: > > Hi, > > > > I am getting a memory leak in my program about timer_delete function. > > > > According valgrind output, > > > > It seems that the timer_delete function doesn't release the memory

Re: [Valgrind-users] Timer delete

2022-11-11 Thread Paul Floyd
On 11/11/22 17:47, Domenico Panella wrote: Hi, I am getting a memory leak in my program about timer_delete function. According valgrind output, It seems that the timer_delete function doesn't release the memory. ==18483== HEAP SUMMARY: ==18483== in use at exit: 272 bytes in 1 blocks ==1

[Valgrind-users] Timer delete

2022-11-11 Thread Domenico Panella
Hi, I am getting a memory leak in my program about timer_delete function. According valgrind output, It seems that the timer_delete function doesn't release the memory. ==18483== HEAP SUMMARY: ==18483== in use at exit: 272 bytes in 1 blocks ==18483==   total heap usage: 54 allocs, 53 frees