Error map

may be used uninitialized C/C++: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]

C/C++ · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (9). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

may be used uninitialized — C/C++: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized] (C/C++)may be used…runtime error: — C/C++: runtime error: signed integer overflow / null pointer / shift exponent too large (UndefinedBehaviorSanitizer) (C/C++)runtime error:narrowing conversion — C++: error: narrowing conversion of 'x' from 'int' to 'char' inside { } [-Wnarrowing] (C/C++)narrowing conversionmakes pointer from integer without a cast — C: warning: assignment makes pointer from integer without a cast (C/C++)makes pointer from …incompatible pointer type — C: warning/error: passing argument from incompatible pointer type [-Wincompatible-pointer-types] (C/C++)incompatible pointe…use-of-uninitialized-value — MemorySanitizer: use-of-uninitialized-value (C/C++)use-of-uninitialize…will be initialized after — C++: warning: 'X::a' will be initialized after 'X::b' [-Wreorder] (C/C++)will be initialized…address of local variable returned — C/C++: warning: address of local variable 'x' returned [-Wreturn-local-addr] (C/C++)address of local va…ISO C++ forbids converting a string constant — C++: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] (C/C++)ISO C++ forbids con…Conditional jump depends on uninitialised value — valgrind: Conditional jump or move depends on uninitialised value(s) (C/C++)Conditional jump de…cannot declare variable to be of abstract type — C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions) (C/C++)cannot declare vari…control reaches end of non-void function — C/C++: warning: control reaches end of non-void function [-Wreturn-type] (C/C++)control reaches end…Assertion failed — C/C++: Assertion `x > 0' failed. Aborted (core dumped) — assert() condition was false (C/C++)Assertion failedE0308 — Rust: error[E0308]: mismatched types — expected `X`, found `Y` (Rust)E0308invalid conversion from — C++: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] (C/C++)invalid conversion …does not name a type — C++: error: 'string' does not name a type (C/C++)does not name a typeinvalid memory address or nil pointer dereference — Go: panic: runtime error: invalid memory address or nil pointer dereference (Go)invalid memory addr…ISO C++ forbids comparison between pointer and integer — C++: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] (C/C++)ISO C++ forbids com…implicit declaration of function — C: warning: implicit declaration of function 'foo' [-Wimplicit-function-declaration] (C/C++)implicit declaratio…discards qualifiers — C++: error: passing 'const X' as 'this' argument discards qualifiers [-fpermissive] (C/C++)discards qualifierscall of overloaded is ambiguous — C++: error: call of overloaded 'f(int)' is ambiguous (C/C++)call of overloaded …reference to is ambiguous — C++: error: reference to 'X' is ambiguous (using namespace std conflicts) (C/C++)reference to is amb…attempting double-free — AddressSanitizer: attempting double-free on address (C/C++)attempting double-f…implicitly deleted — C++: error: call to implicitly-deleted default constructor of 'X' (C/C++)implicitly deletedC2512 — MSVC: error C2512: 'X': no appropriate default constructor available (C/C++)C2512Segmentation fault — C/C++: Segmentation fault (core dumped) — SIGSEGV from a null, dangling or out-of-bounds pointer (C/C++)Segmentation faultAddressSanitizer: heap-use-after-free — C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free (C/C++)AddressSanitizer: h…E0608: cannot index into a value of type — Rust: error[E0608]: cannot index into a value of type `HashSet<i32>` / `String` cannot be indexed by `{integer}` (Rust)E0608: cannot index…assignment to expression with array type — C: error: assignment to expression with array type (C/C++)assignment to expre…alloc-dealloc-mismatch — AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) (C/C++)alloc-dealloc-misma…Invalid read of size — valgrind: Invalid read of size 4 / Invalid write — Address is 0 bytes after a block of size (C/C++)Invalid read of size

Directly related (9)

runtime error:C/C++

C/C++: runtime error: signed integer overflow / null pointer / shift exponent too large (UndefinedBehaviorSanitizer)

UBSan detected code that triggers undefined behaviour (overflow, null dereference, out-of-bounds index, bad shift, misaligned acc…

narrowing conversionC/C++

C++: error: narrowing conversion of 'x' from 'int' to 'char' inside { } [-Wnarrowing]

Brace initialisation `{}` refuses conversions that can lose data, such as `double` to `int` or a runtime `int` to `char`.

makes pointer from integer without a castC/C++

C: warning: assignment makes pointer from integer without a cast

An integer is assigned to a pointer (or the reverse) without conversion — often because a function was implicitly declared.

incompatible pointer typeC/C++

C: warning/error: passing argument from incompatible pointer type [-Wincompatible-pointer-types]

A pointer of one type is passed where another pointer type is expected.

use-of-uninitialized-valueC/C++

MemorySanitizer: use-of-uninitialized-value

Uninitialised memory influenced a branch or output.

will be initialized afterC/C++

C++: warning: 'X::a' will be initialized after 'X::b' [-Wreorder]

Members are initialised in declaration order, not in the order of the constructor's initialiser list.

address of local variable returnedC/C++

C/C++: warning: address of local variable 'x' returned [-Wreturn-local-addr]

The function returns a pointer or reference to a variable that no longer exists after it returns.

ISO C++ forbids converting a string constantC/C++

C++: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

A string literal (const char[]) is assigned to a non-const `char*`.

Conditional jump depends on uninitialised valueC/C++

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

A branch used a value that was never set.

Two steps away (21)

cannot declare variable to be of abstract typeC/C++

C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions)

You tried to create an object of a class that still has pure virtual functions; only a derived class that overrides all of them c…

control reaches end of non-void functionC/C++

C/C++: warning: control reaches end of non-void function [-Wreturn-type]

A function that promises a return value can finish without returning one on some path — undefined behaviour in C++.

Assertion failedC/C++

C/C++: Assertion `x > 0' failed. Aborted (core dumped) — assert() condition was false

An `assert()` in your code or in a library found its condition false and aborted the program on purpose.

E0308Rust

Rust: error[E0308]: mismatched types — expected `X`, found `Y`

A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…

invalid conversion fromC/C++

C++: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]

C++ forbids silently dropping `const` or converting between unrelated pointer types — typically a string literal assigned to `cha…

does not name a typeC/C++

C++: error: 'string' does not name a type

Where the compiler expected a type, it found a name it does not know as one — a missing header, namespace, or class declared late…

invalid memory address or nil pointer dereferenceGo

Go: panic: runtime error: invalid memory address or nil pointer dereference

The program used a pointer, map, interface or struct field that was nil — usually an uninitialised value or an ignored error.

ISO C++ forbids comparison between pointer and integerC/C++

C++: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]

You compared a string literal or pointer with a character or integer — typically `ch == "y"` instead of `ch == 'y'`.

implicit declaration of functionC/C++

C: warning: implicit declaration of function 'foo' [-Wimplicit-function-declaration]

In C you called a function the compiler has not seen declared — usually a missing `#include`. Newer compilers treat it as an erro…

discards qualifiersC/C++

C++: error: passing 'const X' as 'this' argument discards qualifiers [-fpermissive]

A const object (or const reference) is calling a method that is not declared const, which could modify it.

call of overloaded is ambiguousC/C++

C++: error: call of overloaded 'f(int)' is ambiguous

Two or more overloads fit equally well, so the compiler refuses to guess which function you meant.

reference to is ambiguousC/C++

C++: error: reference to 'X' is ambiguous (using namespace std conflicts)

Two declarations of the same name are visible, usually because of `using namespace std`.

attempting double-freeC/C++

AddressSanitizer: attempting double-free on address

The same memory was freed twice.

implicitly deletedC/C++

C++: error: call to implicitly-deleted default constructor of 'X'

A class has no usable default constructor because a member or base cannot be default-constructed.

C2512C/C++

MSVC: error C2512: 'X': no appropriate default constructor available

A default-constructed object requires a default constructor that does not exist.

Segmentation faultC/C++

C/C++: Segmentation fault (core dumped) — SIGSEGV from a null, dangling or out-of-bounds pointer

The program touched memory it is not allowed to access — a null or dangling pointer, an out-of-range array index, or a stack over…

AddressSanitizer: heap-use-after-freeC/C++

C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free

The program read or wrote a heap block after it had been freed; ASan shows who freed it and where it was allocated.

E0608: cannot index into a value of typeRust

Rust: error[E0608]: cannot index into a value of type `HashSet<i32>` / `String` cannot be indexed by `{integer}`

The type doesn't support `[]` indexing (or not with that index type).

assignment to expression with array typeC/C++

C: error: assignment to expression with array type

C cannot assign one array to another with `=`.

alloc-dealloc-mismatchC/C++

AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete)

Memory was allocated with one family (new[]/malloc) and freed with another.

Invalid read of sizeC/C++

valgrind: Invalid read of size 4 / Invalid write — Address is 0 bytes after a block of size

Valgrind detected a heap read/write outside an allocation.