Hello,
I am currently using a Git/master build of Valgrind (3.26.0.GIT) on Ubuntu, and 
it works perfectly when run from the terminal using standard command-line 
options, e.g.:

valgrind --tool=memcheck ./MyApp


However, when I try to run the same executable via Qt Creator’s Valgrind 
integration, which launches Valgrind with the following options:

--child-silent-after-fork=yes
--xml-socket=127.0.0.1:<port>
--log-socket=127.0.0.1:<port>
--xml=yes
--smc-check=stack
--tool=memcheck
--gen-suppressions=all
--track-origins=yes
--leak-check=summary
--num-callers=25


Valgrind crashes immediately with:

valgrind: ../../coregrind/m_libcprint.c:402 (prepare_sink_socket): Assertion 
'sink->fd == 2' failed.
Segmentation fault (core dumped)


>From my observations:

  *
The crash appears only when XML/socket logging is used.
  *
The runtime binaries (e.g., memcheck-amd64-linux and vgpreload_*.so) are 
present in the build directory, not in the lib/valgrind folder, but Valgrind 
works fine when called directly from the terminal.
  *
Using the Ubuntu system Valgrind package avoids the crash with Qt Creator.

My questions are:

  1.
Is this behavior a known issue with Git/master builds of Valgrind?
  2.
Are there plans to support Qt Creator’s XML/socket logging fully in future 
releases?
  3.
Are there recommended workarounds for using Git/master Valgrind with IDEs that 
rely on socket-based logging?

Thank you for any insights or guidance.
Best regards,
Thomas

_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to