Skip to content

Instantly share code, notes, and snippets.

@pbackus
Created June 23, 2022 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbackus/0e9c9d0c83cd7d3a46365c054129c554 to your computer and use it in GitHub Desktop.
Save pbackus/0e9c9d0c83cd7d3a46365c054129c554 to your computer and use it in GitHub Desktop.
issue c zig (release-safe) rust (release) Nim (release) Nim (danger) D (@safe)
out-of-bounds heap read/write none runtime runtime runtime none runtime
null pointer dereference none runtime runtime runtime none runtime¹
type confusion none runtime, partial runtime compile time compile time compile time
integer overflow none runtime runtime runtime none wraps
use after free none none compile time handled by gc handled by gc handled by gc or rc
double free none none compile time handled by gc handled by gc handled by gc or rc
invalid stack read/write none none compile time handled by gc handled by gc compile time
uninitialized memory none none compile time memory always zeroed memory always zeroed memory always initialized
data race none none compile time none none compile time (WIP)²
  1. D relies on the operating system to trap null dereferences.
  2. D's type system distinguishes between shared and thread-local data. Compile-time checks for unsynchronized access to shared data are partially implemented and currently considered experimental.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment