# Software Memory Safety

**URL:** <https://discourse.julialang.org/t/software-memory-safety/90132>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [November 11, 2022, 5:53pm UTC](https://discourse.julialang.org/t/software-memory-safety/90132 "2022-11-11T17:53:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [November 11, 2022, 5:53pm UTC](https://discourse.julialang.org/t/software-memory-safety/90132/1 "2022-11-11T17:53:50Z")

</div>

“The National Security Agency (NSA) published guidance today to help software developers and operators prevent and mitigate software memory safety issues, which account for a large portion of exploitable vulnerabilities.”

See this link [NSA Releases Guidance on How to Protect Against Software Memory Safety Issues \> National Security Agency/Central Security Service \> Article](https://www.nsa.gov/Press-Room/News-Highlights/Article/Article/3215760/nsa-releases-guidance-on-how-to-protect-against-software-memory-safety-issues/)

The report says:

“Using a memory safe language can help prevent programmers from introducing certain  
types of memory-related issues. Memory is managed automatically as part of the  
computer language; it does not rely on the programmer adding code to implement  
memory protections. The language institutes automatic protections using a combination  
of compile time and runtime checks. These inherent language features protect the  
programmer from introducing memory management mistakes unintentionally. Examples  
of memory safe language include C#, Go, Java®, Ruby™, Rust®, and Swift®.”

Does Julia also protect the programmer from making unintentional memory management mistakes? I expect the answer to be yes, but would like to hear about this issue from the experts.

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [November 11, 2022, 9:40pm UTC](https://discourse.julialang.org/t/software-memory-safety/90132/2 "2022-11-11T21:40:26Z")

</div>

Julia is mostly memory safe. You usually have to do something specific if you want to get around safety checks, like using `@inbounds`. There are a few unfortunate exceptions where umanaged memory accesses happen without the user specifically asking for it like [Warn on uninitialized isbits-fields in structs? · Issue #24943 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/24943).
