The bibliographic entry was discovered and compiled by a machine, and published without a person checking it against the publication. The publication itself is the authors' own work — this badge says nothing about it.

Exploring C semantics and pointer provenance

The work

AuthorsKayvan Memarian; Victor B. F. Gomes; Brooks Davis; Stephen Kell; Alexander Richardson; Robert N. M. Watson; Peter Sewell
Editors
Typearticle
Year2019
Citekeymemarian2019exploring

Where it appeared

Published inProceedings of the ACM on Programming Languages
PublisherAssociation for Computing Machinery
Volume3
IssuePOPL
Pages1--32

Identifiers

DOI10.1145/3290380
OpenAlexW2899856510

From OpenAlex, which stores abstracts as an index of words and their positions: what is shown is rebuilt from that, and reads fluently whether or not it is what the author wrote.

Abstract

The semantics of pointers and memory objects in C has been a vexed question for many years. C values cannot be treated as either purely abstract or purely concrete entities: the language exposes their representations, but compiler optimisations rely on analyses that reason about provenance and initialisation status, not just runtime representations. The ISO WG14 standard leaves much of this unclear, and in some respects differs with de facto standard usage --- which itself is difficult to investigate. In this paper we explore the possible source-language semantics for memory objects and pointers, in ISO C and in C as it is used and implemented in practice, focussing especially on pointer provenance. We aim to, as far as possible, reconcile the ISO C standard, mainstream compiler behaviour, and the semantics relied on by the corpus of existing C code. We present two coherent proposals, tracking provenance via integers and not; both address many design questions. We highlight some pros and cons and open questions, and illustrate the discussion with a library of test cases. We make our semantics executable as a test oracle, integrating it with the Cerberus semantics for much of the rest of C, which we have made substantially more complete and robust, and equipped with a web-interface GUI. This allows us to experimentally assess our proposals on those test cases. To assess their viability with respect to larger bodies of C code, we analyse the changes required and the resulting behaviour for a port of FreeBSD to CHERI, a research architecture supporting hardware capabilities, which (roughly speaking) traps on the memory safety violations which our proposals deem undefined behaviour. We also develop a new runtime instrumentation tool to detect possible provenance violations in normal C code, and apply it to some of the SPEC benchmarks. We compare our proposal with a source-language variant of the twin-allocation LLVM semantics proposal of Lee et al. Finally, we describe ongoing interactions with WG14, exploring how our proposals could be incorporated into the ISO standard.

How it got here

How it got hereagent via openalex
Added2026-10-25 20:09 UTC
Not denied bya person 2026-10-29 17:12 UTC

Cite it as

@article{memarian2019exploring,
  title        = {Exploring C semantics and pointer provenance},
  author       = {Kayvan Memarian and Victor B. F. Gomes and Brooks Davis and Stephen Kell and Alexander Richardson and Robert N. M. Watson and Peter Sewell},
  year         = {2019},
  journal      = {Proceedings of the ACM on Programming Languages},
  publisher    = {Association for Computing Machinery},
  volume       = {3},
  number       = {POPL},
  pages        = {1--32},
  doi          = {10.1145/3290380},
}

This record lives at https://refs.drheap.org/memarian2019exploring/ and will keep doing so.