[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] Uninitialised data

From: Ferry Huberts
Subject: Re: [gpsd-dev] Uninitialised data
Date: Thu, 14 Jul 2016 14:43:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

Forgot to mention:

Fedora 24 has gpsd-3.16-2.fc24.x86_64

On 14/07/16 14:42, Ferry Huberts wrote:

I'm on Fedora 24 and valgrind complains about uninitialised data:

$ valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all
./Debug64/testgpsd -d 2 -c 400000 -i br0 -t 1 -s ::1:2240
==19106== Memcheck, a memory error detector
==19106== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==19106== Using Valgrind-3.11.0 and LibVEX; rerun with -h for
copyright info
==19106== Command: ./Debug64/testgpsd -d 2 -c 400000 -i br0 -t 1 -s ::1:2240
==19106== Conditional jump or move depends on uninitialised value(s)
==19106==    at 0x4E4B9D4: gps_sock_read (in /usr/lib64/
==19106==    by 0x4E48A59: gps_read (in /usr/lib64/
==19106==    by 0x404022: main (main.c:453)
==19106==  Uninitialised value was created by a heap allocation
==19106==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==19106==    by 0x4E4B721: gps_sock_open (in /usr/lib64/
==19106==    by 0x4E489DD: gps_open (in /usr/lib64/
==19106==    by 0x4027CF: gpsdConnect (gpsd-util.c:48)
==19106==    by 0x403FBB: main (main.c:443)
testgpsd[19106]: Connected to gpsd 3.16-2.fc24 on localhost, protocol
testgpsd[19106]: Using u-blox device SW 6.02 (36023),HW 00040005,5.00
(28483) on /dev/ttyACM0

I can fix this with the attached patch.

Please consider it for inclusion.

PS. I'm not on the mailing list.

Ferry Huberts

reply via email to

[Prev in Thread] Current Thread [Next in Thread]