# valgrind: Conditional jump or move depends on uninitialised value(s)

**Code:** `Conditional jump depends on uninitialised value` · **Category:** C/C++ · **Seen on:** C/C++, Linux

A branch used a value that was never set.

## Meaning

Valgrind reports that a branch depended on memory that was never written. The value may be random on one run and zero on another, which makes the bug appear intermittent.

## Common causes

- Uninitialised local
- Uninitialised struct field
- Uninitialised struct member read in a condition
- Partly filled buffer

## Quick fix

1. Initialise
2. Zero allocations
3. Run with `--track-origins=yes` to find where the memory came from
4. Initialise variables at declaration

## Detailed fix by platform

### Linux

1. `valgrind --track-origins=yes ./app`

## How to diagnose

1. **Origin** — Where?
2. **Recent change** — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cpp/valgrind-conditional-jump-uninitialised)
