Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

Valgrind - uninitialized values #14

@Lukas955

Description

@Lukas955

Commit 309f9cb causes problems with uninitialized values. For example:

valgrind --leak-check=full ./lnf_ex01_writer -n 100 -f pokus.nfdump
==28602== Memcheck, a memory error detector
==28602== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==28602== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==28602== Command: ./lnf_ex01_writer -n 100 -f pokus.nfdump
==28602== 
==28602== Conditional jump or move depends on uninitialised value(s)
==28602==    at 0x405D63: lnf_lookup_exporter (libnf.c:963)
==28602==    by 0x406011: lnf_write (libnf.c:1040)
==28602==    by 0x40216F: main (lnf_ex01_writer.c:145)

You probably forgot to clear rec->flags in the function lnf_rec_clear() in src/libnf.c, but I'm not sure if flags also don't have deeper meaning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions