On 2016-11-16 12:20-0800 Alan W. Irwin wrote:

Hi Hazen:

I cannot verify the issue you are currently investigating
for example 2 and Qt4 here.  Instead, what I get here is

software@raven> valgrind examples/c/x02c -dev pngqt -fam -o test.pngqt
==24632== Memcheck, a memory error detector
==24632== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==24632== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==24632== Command: examples/c/x02c -dev pngqt -fam -o test.pngqt
==24632== 
==24632== 
==24632== HEAP SUMMARY:
==24632==     in use at exit: 278,874 bytes in 3,630 blocks
==24632==   total heap usage: 51,435 allocs, 47,805 frees, 19,826,765 bytes 
allocated
==24632== 
==24632== LEAK SUMMARY:
==24632==    definitely lost: 8,744 bytes in 45 blocks
==24632==    indirectly lost: 9,329 bytes in 213 blocks
==24632==      possibly lost: 4,676 bytes in 83 blocks
==24632==    still reachable: 256,125 bytes in 3,289 blocks
==24632==         suppressed: 0 bytes in 0 blocks
==24632== Rerun with --leak-check=full to see details of leaked memory
==24632== 
==24632== For counts of detected and suppressed errors, rerun with: -v
==24632== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

There are obviously memory leaks, but there is no memory management
issues (invalid reads or writes, for example) could cause this 
example to segfault due to heap corruption.

I then followed up by using the -DVALGRIND_ALL_TESTS=ON cmake option
and built the test_c_pngqt target to investigate for any memory
management issues for any of our examples. All those resulting
valgrind reports in examples/examples/valgrind.x*.log showed plenty of
leftover memory allocations after the "HEAP SUMMARY:" line at the end
of the report, but there were no actual memory management issues such
as invalid reads showing up during the actual executation of the
example that occurs before that "HEAP SUMMARY:" line is emitted by
valgrind. So there is no chance of Qt4 segfaults here due to heap
corruptions with our
standard examples, and that is also true of examples/c++/qt_example.

In contrast to the Qt4 case, Qt5 (version 5.3.2 from Debian Jessie) 
does show lots of memory management issues.  For example, 22 of the
examples had invalid reads while 11 of them did not according to the
above experiment, and there were invalid reads also for
examples/c++/qt_example. I attribute all those Qt5 memory management
issues to remaining memory management errors in Qt5 (at least the
Debian Jessie version of that library) since we have clean results for
Qt4, and our qt device uses Qt5 exactly like it uses Qt4.

All the above results were for the updated handling of Qt5 and Qt4
linking I have just completed (see commit 7bea18c).

So you will want to try that version as well.

However, if the example 2 memory management issues continue to show up
for qt4 (in contradiction to my good valgrind result above), then I suspect 
your Qt4
library is not a very good one (since I am getting good results with
the Debian Jessie Qt4 library for all our standard examples).  So I
don't think it is worth your time trying to figure out this issue which
is very likely not our problem.

For the record what version of Qt4 and what Linux distro are you
running?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to