Re: [Valgrind-users] a simple case of a helgrind false negative?

2025-08-06 Thread David Faure
to indeterminism, you have no idea what the int's value will be after 10 seconds, because it all depends on thread scheduling by the OS. There are many more factors for indeterminism than data races ;-) -- David Faure, fa...@kde.org, http://www.davidfaure.fr signature

Re: [Valgrind-users] Valgrind runs way slower on faster PC

2025-02-10 Thread David Faure
Lev. 2.9 GHz < 4.0 GHz so it seems to me the second PC has a slower CPU. Assuming that the program is single-threaded, this explains why the second machine is actually slower. -- David Faure, fa...@kde.org, http://www.davidfaure.fr signature.asc Description: This is

Re: [Valgrind-users] RFC: changing Cachegrind default to `--cache-sim=no`

2023-04-04 Thread David Faure
On mardi 4 avril 2023 12:11:18 CEST Nicholas Nethercote wrote: > On Tue, 4 Apr 2023 at 19:24, David Faure wrote: > > But then, with no cache simulation and no call stacks, what's left in > > `cachegrind --cache-sim=no`? > > From the email that started this thread: >

Re: [Valgrind-users] RFC: changing Cachegrind default to `--cache-sim=no`

2023-04-04 Thread David Faure
On lundi 3 avril 2023 23:46:46 CEST Nicholas Nethercote wrote: > On Mon, 3 Apr 2023 at 21:36, David Faure wrote: > > But then, what's the difference between `cachegrind --cache-sim=no` > > and `callgrind`? > > > > https://accu.org/journals/overload/20/11

Re: [Valgrind-users] RFC: changing Cachegrind default to `--cache-sim=no`

2023-04-03 Thread David Faure
k whilst cachegrind gives more information about cache hit rates." Wouldn't one want callstacks? (if this means stack traces). I know I must be missing something, thanks for enlightening me. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5

Re: [Valgrind-users] Helgrind causing data race warning in mutex_destroy_WRK?

2021-08-17 Thread David Faure
c:398) > ==17922==by 0x57F4143: start_thread (pthread_create.c:477) > > To me it seems that Helgrind itself is causing the warning when calculating > mutex_is_init (hg_intercepts.c:859). Isn't this rather a race between unlocking a mutex

Re: [Valgrind-users] How to find memory leaks from an running application

2019-06-20 Thread David Faure
etc.) then you should give > https://github.com/hyc/mleak/ a try. It is faster than all other memory > leak detectors out there, fast enough to run in production. And you can > send it a periodic signal to get a snapshot of currently allocated memory. Or, for another LD_PRELOAD-based tool w

Re: [Valgrind-users] Valgrind Finds More Dynamic Allocations than Inte Pin

2019-02-08 Thread David Faure
t; But heaptrack even reports a larger number: 153 MB! > > On Fri, Feb 8, 2019 at 8:09 PM David Faure wrote: > > On vendredi 8 février 2019 16:32:50 CET Ahmad Nouralizadeh wrote: > > > Hi, > > > I wrote a really simple Pin tool to calculate the number of dynamically >

Re: [Valgrind-users] Valgrind Finds More Dynamic Allocations than Inte Pin

2019-02-08 Thread David Faure
ou're on Linux, I recommend using heaptrack for this :-) https://github.com/KDAB/heaptrack This doesn't really answer your question, sorry about that, but you might want to see which of those tools heaptrack agrees with, it might help finding out who is wrong... -- David Faure, fa...@kde.

[Valgrind-users] Suggestion for vgdb

2018-11-19 Thread David Faure
nitialized? If I understand the architecture correctly, this should be possible to implement, right? -- David Faure | david.fa...@kdab.com | Managing Director KDAB France KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.

Re: [Valgrind-users] helgrind and c++ atomic_flag

2018-09-25 Thread David Faure
grind mailing-list ;-) I admit I'm much less of a helgrind fan since tsan started to work well. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users

Re: [Valgrind-users] Valgrind hangs when generating supression for Qt5 menus

2017-07-14 Thread David Faure
grabbing keyboard/mouse on X11? You can disable this by passing -nograb to the application. > Is there any way to set valgrind to automatically generate suppression code > instead of prompting? Yes, --gen-suppressions=all -- David Faure, fa...@kde.org, http://www.david

Re: [Valgrind-users] Many false positives "Mismatched free() / delete / delete []"

2016-12-22 Thread David Faure
IAS_SYMBOL(ShimCppNew); This is why it didn't happen in smaller testcases, it only happens when including some qtwebengine headers. => No valgrind bug, sorry for the noise. I am now going to yell at the qtwebengine/chromium people for polluting applications with their custom operator n

Re: [Valgrind-users] Many false positives "Mismatched free() / delete / delete []"

2016-12-22 Thread David Faure
f memory allocations hits this. I've seen it before in other programs though so it's not specific to that test either. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 --

Re: [Valgrind-users] Many false positives "Mismatched free() / delete / delete []"

2016-12-22 Thread David Faure
BoxLayout(QWidget *parent) : QBoxLayout(TopToBottom, parent) { } QBoxLayout::QBoxLayout(Direction dir, QWidget *parent) : QLayout(*new QBoxLayoutPrivate, 0, parent) { d->dir = dir; } -- David Faure, fa...@kde.org, http://www.davidfaure.fr

[Valgrind-users] Many false positives "Mismatched free() / delete / delete []"

2016-12-22 Thread David Faure
happening? gcc (SUSE Linux) 4.8.5 valgrind-3.13.0.SVN glibc-2.22-3.7.x86_64 `uname -a` = Linux 4.4.36-8-default #1 SMP Fri Dec 9 16:18:38 UTC 2016 (3ec5648) x86_64 x86_64 x86_64 GNU/Linux OpenSuSE Leap 42.2 -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Fr

Re: [Valgrind-users] helgrind: false race positive with static variable in function

2016-04-03 Thread David Faure
On Wednesday 30 March 2016 11:28:27 Ivo Raisr wrote: > 2016-03-30 10:59 GMT+02:00 David Faure : > > > This simple testcase : > > > > int foo() { > > struct Foo { > > int *i; > > Foo() { i = new int(42); } > >

[Valgrind-users] helgrind: false race positive with static variable in function

2016-03-30 Thread David Faure
catch the mutexes used internally in libstdc++? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 -- Transform Data into Opportunity. Accelerate data analysis in your applications with Inte

Re: [Valgrind-users] helgrind, clang and thread_local

2016-03-22 Thread David Faure
I'll ignore this for now. Thanks! -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data

[Valgrind-users] helgrind, clang and thread_local

2016-03-19 Thread David Faure
g_intercepts.c:389) ==1218== Address 0x1e1f86f0 is in a rw- anonymous segment Helgrind bug, or is clang silently ignoring thread_local? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 -

Re: [Valgrind-users] memory barriers support

2014-08-19 Thread David Faure
On Tuesday 19 August 2014 21:57:02 Philippe Waroquiers wrote: > On Tue, 2014-08-19 at 21:44 +0200, David Faure wrote: > > On Tuesday 19 August 2014 21:00:58 Philippe Waroquiers wrote: > > > On Tue, 2014-08-19 at 16:46 +0200, Roland Mainz wrote: > > > > > ThreadSan

Re: [Valgrind-users] memory barriers support

2014-08-19 Thread David Faure
ndition detection but you would have to annotate either the rcu > library or the calling code to describe the happens before > relationships. Are such annotations documented somewhere? I'm still trying to find a way to annotate threadsafe-statics so that helgrind doesn't c

Re: [Valgrind-users] helgrind and threadsafe-statics

2014-06-20 Thread David Faure
w, annotating all global statics one by one sounds horrible, but actually in my case they're already encapsulated in a macro, and I just need a way to remove all these false positives in order for helgrind to be usable. -- Da

[Valgrind-users] helgrind and threadsafe-statics

2014-06-08 Thread David Faure
void*) (testcase_local_static.cpp:16) ==31469==by 0x4C2D151: mythread_wrapper (hg_intercepts.c:233) ==31469==by 0x4E3C0DA: start_thread (pthread_create.c:309) ==31469==by 0x595B90C: clone (clone.S:111) -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 #i

Re: [Valgrind-users] Beginner hg question: mapping address to the variable

2014-01-18 Thread David Faure
first place. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing

Re: [Valgrind-users] Best valgrind options for finding corrupt memory

2014-01-14 Thread David Faure
est valgrind options for > detecting memory corruption? The default options :-) (memcheck tool) -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -- CenturyLi

Re: [Valgrind-users] valgrind with shell scripts

2014-01-14 Thread David Faure
t using valgrind: > > valgrind ./run.sh –e >& run log > > Will valgrind evaluate the shell script or my app or both? The shell script. Better modify the shell script itself to call valgrind :) But you can also use the above command with --trace-children=yes and then it w

Re: [Valgrind-users] Helgrind 3.9.0: false positive with pthread_mutex_destroy

2013-11-07 Thread David Faure
lloc.c:319) Can you prove that the destroy cannot happen during the unlock? > This was not a problem with 3.8.1 so appears to be a regression or new bug. ... or a fix, which detects an actual problem in the code :) -- David Faure, fa...@k

Re: [Valgrind-users] Limiting helgrind to finding only write-write conflicts

2013-10-13 Thread David Faure
isplay shows the before or the after value"). This being said, helgrind might be missing suppressions for atomic_int (the same way I'm using suppressions for Qt's QAtomicInt) - since on the special case of x86, the two can't be distinguished by helgrind. -- David Faure, fa..

Re: [Valgrind-users] FW: Helgrind to-do list

2013-09-28 Thread David Faure
On Friday 27 September 2013 17:51:19 Phil Longstaff wrote: > > From: David Faure [mailto:fa...@kde.org] > > Sent: Friday, September 27, 2013 11:18 AM > > To: Phil Longstaff > > Cc: valgrind-users@lists.sourceforge.net > > Subject: Re: [Valgrind-users] FW: Helgrind to

Re: [Valgrind-users] FW: Helgrind to-do list

2013-09-27 Thread David Faure
he failed-trylock is the last thing in the chain. If anything happens *after* a failed trylock, then one can't store a "T1 -> anything" link. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5

[Valgrind-users] helgrind: race with no other thread ?

2013-06-22 Thread David Faure
ation::Application() (Application.cpp:107) ==11756==by 0x415019: Application::self() (Application.cpp:208) ==11756==by 0x4152C2: main (Application.cpp:242) ==11756== valgrind-3.9.0.SVN, freshly updated. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particula

Re: [Valgrind-users] Helgrind data race question

2013-05-16 Thread David Faure
doesn't change that. You see it as non-racy because "how could *my_ptr ever be something else than 10" ... but if you think about a multi-processor system, the write of the value 10 might not get propagated to the cache of the other processor where the read happens, since the s

Re: [Valgrind-users] Fw: valgrind on armv71 does not show point of allocation and deallocation

2013-04-03 Thread David Faure
On Wednesday 03 April 2013 20:59:23 Ganapathy Vijay wrote: > I have compiled this code with the arm linux cross compiler (ofcourse with > -g). Did you also disable optimizations? Make sure -O2 isn't in there. Otherwise the call to free() can get inlined, for instance. -- Davi

Re: [Valgrind-users] Helgrind doesn't handle bit field correctly

2013-03-22 Thread David Faure
unsigned int separator:0; between the two lines, in order to make these separate memory locations. I have no idea how compilers are supposed to implement this though. Maybe like gcc's __sync_fetch_and_{or|and} which is an atomic operation... Anyway -- this requires a (compliant) C++11-enabled

[Valgrind-users] helgrind bug in pthread_cond_destroy (testcase)

2013-03-14 Thread David Faure
by 0x4C2FA44: pthread_cond_destroy@* (hg_intercepts.c:958) ==4741==by 0x400AFC: main (testcase_pthread_cond.cpp:21) ==4741== pthread_cond_destroy 0xffefff390 in helgrind, AFTER DO_ and before CALL_ pthread_cond_destroy(0xffefff390) said 0 -- David Faure, fa...@kde.org, http://www.davidfaure.f

Re: [Valgrind-users] helgrind and atomic operations

2013-01-23 Thread David Faure
mfence movl-4(%rbp), %eax popq%rbp .cfi_def_cfa 7, 8 @@ -403,6 +404,7 @@ _ZN10QAtomicOpsIiE12storeReleaseERii: movq-8(%rbp), %rax movl-12(%rbp), %edx movl%edx, (%rax) + mfence popq%rbp .cfi_def_cfa 7, 8 re

Re: [Valgrind-users] Qt5 support in helgrind

2013-01-23 Thread David Faure
QMutex itself having changed, doesn't matter for helgrind's intercepts. The API is the same, so the expected behavior is the same, so helgrind can react the same. So I think we're fine for now. > Once you have a patch you're satisfied with, I'd

Re: [Valgrind-users] helgrind and atomic operations

2013-01-19 Thread David Faure
it be OK to ship a qt5.supp file within valgrind, and load it unconditionnally, like xfree-4.supp is currently handled? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Framewo

[Valgrind-users] Qt5 support in helgrind

2013-01-18 Thread David Faure
implementation... -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 Index: hg_intercepts.c === --- hg_intercepts.c (revision 13107) +++ hg_intercepts.c (working copy) @@ -

Re: [Valgrind-users] helgrind/drd annotations for one statement

2012-12-05 Thread David Faure
On Wednesday 05 December 2012 16:52:42 Leif Walsh wrote: > Rdunlock happens before wrlock. ... and is supposed to be about reading only, so why would CPUs bother to propagate modified data inside that lock, to other CPUs? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on

Re: [Valgrind-users] helgrind/drd annotations for one statement

2012-12-05 Thread David Faure
ecommend reading "C++ Concurrency in action" by Anthony Williams, it taught me a lot on all this all works... definitely not a simple topic. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5

Re: [Valgrind-users] RFC: more flexible way to show or count as error or suppress leak kinds

2012-11-30 Thread David Faure
On Thursday 29 November 2012 23:35:03 Philippe Waroquiers wrote: > On Thu, 2012-11-29 at 08:44 +0100, David Faure wrote: > > > Here are the new command lines args: > > > --show-leak-kinds=kind1,kind2,.. whi

Re: [Valgrind-users] RFC: more flexible way to show or count as error or suppress leak kinds

2012-11-28 Thread David Faure
to have "sane" defaults, so that most users don't actually need to specify these options. Would this mean "show for possible" and "error for definite"? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -

Re: [Valgrind-users] helgrind markup for lock-ordering

2012-11-07 Thread David Faure
On Wednesday 07 November 2012 23:00:51 Philippe Waroquiers wrote: > On Wed, 2012-11-07 at 10:51 +0100, David Faure wrote: > > > The idea of helgrind is that it detects lock order problems and/or > > > race condition problems *even* if no deadlock happens and/or if no > &

Re: [Valgrind-users] helgrind markup for lock-ordering

2012-11-07 Thread David Faure
On Tuesday 06 November 2012 22:56:32 Philippe Waroquiers wrote: > On Tue, 2012-11-06 at 13:43 +0100, David Faure wrote: > > On Monday 05 November 2012 23:19:42 Philippe Waroquiers wrote: > > > On Mon, 2012-11-05 at 18:59 +0100, David Faure wrote: > > > > The testcase

Re: [Valgrind-users] helgrind markup for lock-ordering

2012-11-06 Thread David Faure
On Monday 05 November 2012 23:19:42 Philippe Waroquiers wrote: > On Mon, 2012-11-05 at 18:59 +0100, David Faure wrote: > > The testcase http://www.davidfaure.fr/2012/qmutex_trylock.cpp > > (from https://bugs.kde.org/show_bug.cgi?id=243232) > > shows that an optimization

[Valgrind-users] helgrind markup for lock-ordering

2012-11-05 Thread David Faure
sed to annotate this tryLock() call? PS: see my previous email about VALGRIND_HG_ENABLE_CHECKING not working. Is this known? Should I report a bug? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular K

Re: [Valgrind-users] helgrind and atomic operations

2012-10-23 Thread David Faure
find out that "volatile" was used, if all that does is disable compiler optimizations, so I agree that this cannot all work out of the box, valgrind-specific markup is definitely needed in the Qt atomics class. Current version of my patch attached -- no re-ENABLE for now, since

Re: [Valgrind-users] Large application SIGSEGV when run in valgrind

2012-10-02 Thread David Faure
hat does the code at these two lines, say? Unless valgrind is wrong, something funky is being done by that code, so it might help to see what it's doing. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular

Re: [Valgrind-users] closing bracket of destructor

2012-10-02 Thread David Faure
obviously. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performa

[Valgrind-users] Fwd: Re: helgrind and atomic operations

2012-08-28 Thread David Faure
-- Forwarded Message -- Subject: Re: [Valgrind-users] helgrind and atomic operations Date: Monday 27 August 2012, 15:25:14 From: Marc Mutz To: David Faure CC: valgrind-users@lists.sourceforge.net [I can't post to valgrind-users, please fwd] On Monday August 27 2012,

Re: [Valgrind-users] helgrind and atomic operations

2012-08-27 Thread David Faure
On Sunday 26 August 2012 12:53:41 Marc Mutz wrote: > On Sunday August 26 2012, David Faure wrote: > > On Sunday 26 August 2012 11:28:06 Julian Seward wrote: > > > On Sunday, August 26, 2012, David Faure wrote: > > > > Thiago expects that helgrind can&#

Re: [Valgrind-users] helgrind and atomic operations

2012-08-26 Thread David Faure
On Sunday 26 August 2012 11:28:06 Julian Seward wrote: > On Sunday, August 26, 2012, David Faure wrote: > > Thiago expects that helgrind can't autodetect this case and that helgrind- > > macros markup is needed in Qt, I'm fine with adding that if you guys agree > &

Re: [Valgrind-users] helgrind and atomic operations

2012-08-26 Thread David Faure
On Sunday 26 August 2012 01:30:43 David Faure wrote: > On Saturday 25 August 2012 22:43:58 Julian Seward wrote: > > Or maybe Qt really is racey > > Bingo :) OK, maybe not. Turns out the code runs as intended by the Qt developers. Marc Mutz said " The standard say

Re: [Valgrind-users] helgrind and atomic operations

2012-08-25 Thread David Faure
rticular operation. I reported this to Thiago, I'll be back with a real problem next time, not a no-op implementation :-) Thanks for the input. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Sponsored by Nokia to work on KDE, incl. KDE

[Valgrind-users] helgrind and atomic operations

2012-08-25 Thread David Faure
ume all this is too low-level for helgrind? I.e. can it actually detect atomic operations and therefore validate Qt's implementation, or should we rather just "trust Qt" and aim for silencing helgrind whenever it sees QBasicAtomic{Integer,Pointer}? -- David Faure, fa...@kde