[Bug 282998] Qt Creator: Valgrind integration not working
Date: Wed, 27 Nov 2024 07:34:38 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282998 Bug ID: 282998 Summary: Qt Creator: Valgrind integration not working Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: pjfloyd@wanadoo.fr Bit of background. I use Qt Creator for Valgrind development (and maintain the FreeBSD port). However I almost never use Valgrind in Creator. I'm working on a Valgrind Bugzilla item that will change Valgrind's XML output and I want to check that it does not impact GUIs like CLion and Qt Creator. However it seems as though nothing is working even without any changes to Valgrind. I'm using this small example which has one Conditional jump and one leak. #include <iostream> using namespace std; int main() { int* pi = new int[10]; if (pi[0]) return 1; return 0; } In a terminal I get ==68245== Conditional jump or move depends on uninitialised value(s) ==68245== at 0x400631: main (main.cpp:8) ==68245== ==68245== ==68245== HEAP SUMMARY: ==68245== in use at exit: 3,120 bytes in 7 blocks ==68245== total heap usage: 8 allocs, 1 frees, 76,848 bytes allocated ==68245== ==68245== 40 bytes in 1 blocks are definitely lost in loss record 1 of 7 ==68245== at 0x484E5C4: operator new[](unsigned long) (vg_replace_malloc.c:743) ==68245== by 0x400624: main (main.cpp:7) In Qt Creator if I run Analyze->Valgrind Memory Analyzer then the bar of the Memcheck window shows "Memory Analyzer Tool finished. 2 issues were found.". That's as expected. However the main widget is empty - there are no lines in Memory Issues / Issue | Location. In Application Output I see 08:23:07: valgrind --child-silent-after-fork=yes --xml-socket=127.0.0.1:16219 --log-socket=127.0.0.1:64635 --xml=yes --smc-check=stack --tool=memcheck --gen-suppressions=all --track-origins=yes --leak-check=summary --num-callers=25 /home/paulf/scratch/errs/build/clang-Debug/errs If I run Analyze->Valgrind Memory Analyzer with GDB then it works OK if I switch the project to use GDB. It hangs if the default lldb is used - would it be possible to issue a warning if the user is trying to to this? Or is that something that should be done upstream? I've tried with both the valgrind and valgrind-devel ports. I'm using FreeBSD 14.1 amd64. I'll try the same example on Linux to see if that works. -- You are receiving this mail because: You are the assignee for the bug.