Hello,

I'm looking for some hints, advice and any other things that could help me
figure this out.

I have a big program which I wanted to debug some memory issues. This
program internally creates and runs several threads.

But when launched with valgrind, one of the threads is not created.

Attaching gdb with valgrind, I can break on the line creating the thread, I
can add a breakpoint in that thread function, but it never reaches the
thread function. All other threads are well created and run.

Without valgrind, the thread is well created and runs well. Both with and
without gdb, with and without debugging symbols.

In general, the main program runs well, and never faces issues with
threads. It just exposes some memory issues with a particular dataset which
I want to debug.

The program is written in C++ 20. That particular problematic thread is
simply created by a line like:

auto thread = new std::thread(&Class::MemberFunction, this, ptr1, ptr2);

So nothing fancy, in my opinion. The debugger reaches that line, and a
press to next never enters the breakpoint set in Class::MemberFunction.

In case that could matter, I'm using valgrind 3.19.0 on Debian 12.

Thank you in advance.
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to