[all-commits] [llvm/llvm-project] 47822c: [LangRef] Clarify that the pointer after an object...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Feb 24 13:23:23 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47822c80c1b259973c29521315e3c355d1d553ad
      https://github.com/llvm/llvm-project/commit/47822c80c1b259973c29521315e3c355d1d553ad
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-02-24 (Mon, 24 Feb 2025)

  Changed paths:
    M llvm/docs/LangRef.rst

  Log Message:
  -----------
  [LangRef] Clarify that the pointer after an object must be valid. (#127892)

In some places, we rely on the assumption that the pointer after the
object must also be valid and not overflow, but it does not seem to be
spelled out clearly in LangRef, unless I missed a reference.

The GetElementPtr section mentions that the maximum object size is half
the pointer index type space, but then the pointer past the object may
wrap. Clarify that the pointer after the object must also be valid.

This should match Alive2's semantics:
https://alive2.llvm.org/ce/z/Dk8QFL
(https://github.com/AliveToolkit/alive2/blob/master/tools/transform.cpp#L1288)

PR: https://github.com/llvm/llvm-project/pull/127892



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list