Changeset 8a237c7


Ignore:
Timestamp:
06/27/18 11:14:47 (2 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
3b6ca9a, d228977
Parents:
5577521
Message:

Fix uninitialised memory complaints when sending first packet msg.

Valgrind doesn't like it when we write unpacked structures without
explicitly setting all bytes (including the padding ones) to zero
beforehand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    rc22a4bb r8a237c7  
    10481048        ASSERT_RET(pthread_spin_unlock(&libtrace->first_packets.lock), == 0);
    10491049
     1050        memset(&mesg, 0, sizeof(libtrace_message_t));
    10501051        mesg.code = MESSAGE_FIRST_PACKET;
    10511052        trace_message_reporter(libtrace, &mesg);
     
    11951196
    11961197        gettimeofday(&prev, NULL);
     1198        memset(&message, 0, sizeof(libtrace_message_t));
    11971199        message.code = MESSAGE_TICK_INTERVAL;
    11981200
Note: See TracChangeset for help on using the changeset viewer.