TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24864 17
C++/sys - A Standard Library Projection to Facilitate the Verification of Run-time Memory Safety

Hi all,

A while ago I was looking for a relevant C++ conference to demonstrate the capabilities of C++/sys. A pure C++ mechanism which offers a new approach to memory safety via debug-time verification.

My talk was accepted into C++Online 2026 which concluded a couple of weeks ago. The discussions were great, I received some really useful feedback (and the little 2D gather town was pretty fun!).

The slides are available here and the release video should appear on YouTube in the following weeks.

Excited to share the tech with the wider community. Much of it is discussed in the slides; some highlights:

Offers improvements over AddressSanitizer in terms of C++ error detection rate
Tracks access lifespan rather than blocks of data
Has contextual knowledge of C++ objects and containers so generally quite performant
100% detection rate for executed paths
Memory pinning and locking mechanism tracks dangling 'this' and references
Zero overhead in release builds
Compatible with any standard C++ compiler (from hosted C++98 running on MS-DOS to freestanding C++${LATEST} on Zephyr)
Doesn't interfere with C code/libraries. Just like Java, Rust, Python thin-bindings, these are treated as unchecked.

Some of the above sounds like magic but the core mechanism allowing for this is quite simple. Temporaries created by operator->, operator* and operator[\] lock memory for the lifetime of access and pointers are entirely prevented from dangling in a coarse-grained manner. Obviously this has an impact on what designs are possible with some discussion in the slides.

Link to the open-source (BSD 3-clause) reference implementation is here.

https://codeberg.org/kpedersen/sys\_public

https://research.thamessoftware.co.uk/sys

Very happy to discuss further. It has some rough areas but I personally love the tech and find it makes writing and testing C++ considerably more satisfying knowing that there is virtually zero chance of a memory error lurking in the tested branches.



https://redd.it/1rz3df4
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
More from @r_cpp
  1. Oct 6, 2026C++26: Module improvements https://www.sandordargo.com/blog/2026/09/09/cpp26-modules https…
  2. Oct 6, 2026Tuning a Server for Benchmarking https://david.alvarezrosa.com/posts/tuning-a-server-for-b…
  3. Oct 6, 2026boost.org has been rebuilt: new profiles, badges, search, and library filtering The Boost…
  4. Oct 6, 2026When (Not) to Use alloca() https://voithos.io/articles/when-not-to-use-alloca/ https://red…
  5. Oct 6, 2026MSVC Build Tools Preview updates – September 2026 https://devblogs.microsoft.com/cppblog/m…
  6. Oct 6, 2026I built MrDocs, an open-source C++ reference doc generator on the Clang/LLVM AST. Looking…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →