mlsanityData to 14 Oct 2026

CNnotator: LLM-Guided Memory Safety Annotation Synthesis

arXiv 2606.21822 ↗First posted 20 Jun 2026cs.PL cs.AI cs.SEcited by 0

Not on the map. Why?

Abstract (arXiv)

Memory safety errors account for a large proportion of security bugs in systems written in C; modern languages such as Java and Rust prevent such bugs because they are memory-safe by design. To migrate systems to safer languages or identify memory errors, we must first determine how legacy code manipulates memory. This information is only represented implicitly in such code. In many cases, memory usage patterns are merely tedious for humans to figure out, rather than truly difficult. In this work, we ask if large language models (LLMs) can perform this task by having them synthesize annotations representing memory usage as specifications in CN, a hybrid testing/verification tool. Our tool, CNnotator, uses LLMs to automatically generate and test CN specifications. We find that current models are able to generate CN specifications for small-to-medium C programs, with the OpenAI o3 reasoning model achieving a 90% success rate on first attempts and 97% overall success, while the chat model GPT-4o correctly annotates 65% of first attempts. These results suggest AI-assisted annotation is becoming practical for real-world C codebases.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 4 of its 20 references that are in the map. First posted on arXiv 20 Jun 2026.

Builds on

4 of 20 references.

References · 4

  1. 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 991
  2. 2023Large Language Models for Code Analysis: Do LLMs Really Do Their Job?cited by 45
  3. 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilationcited by 19
  4. 2025C2SaferRust: Transforming C Projects into Safer Rust with NeuroSymbolic Techniquescited by 18

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026LLM4C2Rust: Large Language Models for Automated Memory-Safe Code Transpilation ↗
  2. 2023LLM4VV: Developing LLM-Driven Testsuite for Compiler Validation
  3. 2026MemTrace: Tracing and Attributing Errors in Large Language Model Memory Systems
  4. 2024SG-Bench: Evaluating LLM Safety Generalization Across Diverse Tasks and Prompt Types
  5. 2026LLM Serving in the Wild: An Empirical Study of Frameworks, Methods, and System Designs
  6. 2026Teaching LLMs Program Semantics via Symbolic Execution Traces
  7. 2026Memorization Diagnostics for Code LLMs Should be Scale-Aware
  8. 2025REMODEL-LLM: Transforming C code to Java using LLMs