DefectDB Welcome to DefectDB, an open-source database of defects found in software projects. Architecture Linkage Call beyond allowed Disallowed call Arithmetic Bitmasks Invalid bitmask Division Possible division by zero Floating point numbers Comparison Exact float comparison Fractional part Fractional part of floating point variable might be missing Integers Possible integer overflow Pointers Unreasoned pointer arithmetics Bit shift Incorrect integer shift Unsigned Related to zero Partially pointless comparison of unsigned to zero Incorrect subtraction Arrays Indices Negative index in array access The index is out of range Slices Slice misuse Slice modification might be incorrect Abstract Syntax Tree Binary operations Identical subexpressions in binary operation SizeOf operations sizeof() is likely to be misused Casts Floating point numbers Implicit float to integer conversion Integers Integer is implicitly truncated Pointer Implicit pointer to integer conversion Classes Members Uninitialized class member Context Interrupts Sleep in interrupt Threads Printing in thread Scanning in thread C++ Arithmetic Multiplication narrows then widens Classes Missing virtual destructor Concurrency Mutexes acquired in inconsistent order Recursive lock on non-recursive mutex Constructors and destructors Virtual call from constructor or destructor Destructors Throw reachable in destructor Error handling Empty catch block Iterators Iterator used after container mutation Lifetime string_view / span bound to a temporary Memory Mismatched allocator and deallocator Assignment operator Self-assignment guard missing Security Time-of-check / time-of-use race Strings Buffer not guaranteed null-terminated sprintf with %s — output is unbounded Switch Switch case falls through C# Asynchrony async void method Debugging Debug.Assert(false) reached Debug.Fail called Disposal IDisposable not disposed Exceptions NotImplementedException thrown NotSupportedException thrown catch (Exception) swallows the error Locking lock on string literal is deadlock-prone lock(this) is deadlock-prone lock on typeof(X) is process-wide Marshalling Marshal allocation Marshal.PtrToStructure Null handling Equals(null) throws on null receiver Process Environment.Exit called Environment.FailFast called Process.Start with string argument Strings string concatenation in loop string == may compare references Tasks blocking wait on Task Expressions Evaluation Order Unknown evaluation order Qualifiers Const qualifier Possible const qualifier dropping Files Read Reading 0 symbols is pointless States File is closed twice File is not open Write Writing 0 symbols is pointless Functions Arguments Confusing overloading with mixed parameter order Null argument Result Important function result is ignored Timing No timeout handling Garbage Collector Misuse Overloading of garbage collector Go Entry point Invalid signature for main() IPC Channels Operation on closed channel Null channel Unread channel Unwritten channel Wrong channel direction JavaScript Arrays indexOf compared to -1 Asynchrony Promise result is unhandled Comparison Loose equality (== or !=) Debugging debugger statement Error handling Empty catch block Legacy with statement Scopes var declaration Security eval() called setTimeout/setInterval called with string Logic Assignments Unreasoned assignment Unused assignment result Complete behaviours Observed behaviour doesn't fall within accepted range Conditions Condition is always false Condition is always true Assignment in condition Contracts No proof available Contract violation Disjoint behaviours Observed behaviour matches more than one of disjoint behaviours Invariants Invariant check failed Loops Missing loop variable Memory Blocks Free Double free Memory leak is possible Pointers Comparison Comparing pointer to a constant is strange Dangling pointer Access to null pointer is possible Parsing External tool error Parsing failed Rust Borrowing Multiple mutable borrows Mutable borrow while shared borrow exists Use of moved value Debugging dbg! left in code Environment Empty environment variable key Memory mem::forget called mem::transmute called Option Unwrap of None Panics panic! called todo! called unimplemented! called unreachable! reached Pointers Null pointer copy Null pointer read Null pointer write Result Unwrap of Err Unwrap of Ok SBOM Diff SBOM: package added SBOM: package version changed SBOM: package removed Licensing License policy violation Vulnerable dependency Standard Library Allocation Allocation of zero size block Formatting Arguments Argument type does not match the format string Format argument is not present Format argument is redundant Format Format string is not constant Parameters Format parameter is invalid Locking Double lock Map Null map Pthread Exit pthread_exit() might cause leaks Rng srand() should be called only once Unlock Double unlock Lock not locked Switch Cases Too many switch cases Non-trivial switch case might cause performance issues Threading Language constructs Misuse of sync.Once Locking Locking is inconsistent Missing locking in thread Threads Too many threads or light-weight processes Translation Failed to convert code to internal representation TypeScript Types any type used non-null assertion Types Assignments Incompatible types in assignment Variables Confusion Misuse of null/empty variables Deinitialization Defer in loop Interfaces Null interface Scopes Variable is accessible outside its scope Variable shadows another variable Unused variable Size Capacity of the object is too big States Uninitialized variable is used Static Static variable must be initialized