# Memory Tagging and how it improves C/C++ memory safety

**Authors:** Kostya Serebryany, Evgenii Stepanov, Aleksey Shlyapnikov, Vlad, Tsyrklevich, Dmitry Vyukov

arXiv: 1802.09517 · 2018-02-27

## TL;DR

Memory tagging, a hardware-assisted technique, can significantly enhance memory safety in C/C++ by reducing errors, as demonstrated through two existing implementations in SPARC and AArch64 architectures.

## Contribution

The paper introduces and evaluates two hardware-assisted memory tagging implementations, advocating for broader adoption to improve memory safety in C/C++.

## Key findings

- Memory tagging improves memory safety in C/C++
- Two implementations: SPARC hardware and AArch64 compiler-assisted
- Encourages wider industry support for memory tagging

## Abstract

Memory safety in C and C++ remains largely unresolved. A technique usually called "memory tagging" may dramatically improve the situation if implemented in hardware with reasonable overhead. This paper describes two existing implementations of memory tagging: one is the full hardware implementation in SPARC; the other is a partially hardware-assisted compiler-based tool for AArch64. We describe the basic idea, evaluate the two implementations, and explain how they improve memory safety. This paper is intended to initiate a wider discussion of memory tagging and to motivate the CPU and OS vendors to add support for it in the near future.

---
Source: https://tomesphere.com/paper/1802.09517