[DynInst_API:] [dyninst/dyninst] 3d2959: Prevent use of possibly-uninitialized local variable


Date: Wed, 10 May 2023 10:53:13 -0700
From: Tim Haines <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] 3d2959: Prevent use of possibly-uninitialized local variable
  Branch: refs/heads/fix_uninit_var
  Home:   https://github.com/dyninst/dyninst
  Commit: 3d2959ce054a59883289a4ff539ddc5ea945066c
      https://github.com/dyninst/dyninst/commit/3d2959ce054a59883289a4ff539ddc5ea945066c
  Author: Tim Haines <thaines.astro@xxxxxxxxx>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M dyninstAPI_RT/src/RTfreebsd.c
    M proccontrol/src/process.C
    M symtabAPI/src/Object-elf.C

  Log Message:
  -----------
  Prevent use of possibly-uninitialized local variable

These were found using cppcheck's uninitvar and eraseDereference.

For the usages of iterator-like classes in process.C, they aren't strictly
uninitialized variable usages since the classes in question are standard
layout types. It would be better to replace the usages there with list
construction to avoid the static check altogether.


[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] 3d2959: Prevent use of possibly-uninitialized local variable, Tim Haines <=