[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] [PATCH] Fix memory leak in Qt build.
From: |
Robert Norris |
Subject: |
Re: [gpsd-dev] [PATCH] Fix memory leak in Qt build. |
Date: |
Fri, 3 Feb 2017 19:50:00 +0000 |
Thanks for applying the patch.
I have tested it :) and I can also provide patches to:
1. Restore building the test_qgpsmm program (as per a previous email about Qt
stuff)
2. Modification to test_gpsmm.c to accept input options and provide a way to
make it end cleanly - thus enabling to trace memory leaks.
(rather than always entering a forever loop).
ATM my patch uses getopts() which whilst not being especially C++esque,
it's simpler than requiring boost::program_options (when Boost otherwise not
needed) or some other C++ way of dealing with command line.
Interestingly using Qt4 by default showed some Qt internal issues - whether
they were really real or not I don't know.
But forcing using Qt5 no issues were found.
I notice there is a 'valgrind-audit' for gpsd but that appears tailored for the
daemon.
Using python gpsfake appears to directly handle the client side interface,
bypassing the libgps C/C++ code.
So I'm thinking to extend gpsfake to have options/capability to spawn the test
libgps/lib(Q)gpsmm and thus automatically check memory allocation.
--
Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.
________________________________________
From: gpsd-dev <address@hidden> on behalf of Fred Wright <address@hidden>
Sent: 03 February 2017 03:30:47
To: address@hidden
Subject: Re: [gpsd-dev] [PATCH] Fix memory leak in Qt build.
On Thu, 2 Feb 2017, Robert Norris wrote:
> Since privdata is always allocated in gps_sock_open(),
> it always needs to be free'd in gps_sock_close().
[...]
Merged.
I only tested that it builds, since I don't have a way to test *running*
Qt, but the change looked straightforward enough.
Fred Wright