Skip to content

Track allocator and free provenance #26

Description

@itsfuad

Goal

Track allocator provenance for allocation-owning values and enforce safe deallocation across semantic and LLVM boundaries.

Completed

  • Added allocator descriptors to owning dynamic arrays and strings.
  • Added allocator-aware allocation, release, drop glue, and automatic cleanup.
  • Consumed owned values passed to alloc; allocator is sized and equatable.
  • Kept carrier-only array/string ABI paths free of unnecessary allocator runtime symbols.
  • Centralized owned-interface ABI layout and separated owned/borrowed interface symbols.
  • Fixed borrowed-interface thunk receiver lowering.
  • Rejected owner-bearing extern parameters and returns with T0021.
  • Added raw-pointer FFI fixtures and cross-module owned ABI coverage.
  • Made synthesized allocator bridge symbols module-local to avoid duplicate definitions.

Evidence

  • Commits: 53c5432, ea925f1, d651bda.
  • Full Go tests, vet, bundle generation, positive runtime fixtures, negative semantic fixtures, and git diff --check pass.
  • main is synced to origin/main.

Future boundaries

  • Owner-bearing values must not cross arbitrary FFI; use explicit raw-pointer adoption/release APIs.
  • Scoped/custom allocator instances and portable runtime bridge replacement remain future design work.
  • See Add scoped and custom allocator behavior #64 for separate allocator-behavior/lowering follow-up.

Activity

  1. added
    enhancementNew feature or request
    ownershipOwnership, move, copy, pointer-safety work
    language-modelPeeper language model, ownership, pointer, optional, array/slice work
    on Jun 27, 2026
  2. moved this from Todo to In Progress in Peeper Roadmapon Jun 29, 2026
  3. moved this from In Progress to Done in Peeper Roadmapon Jul 28, 2026
  4. closed this as completedby moving to Done in Peeper Roadmapon Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlanguage-modelPeeper language model, ownership, pointer, optional, array/slice workownershipOwnership, move, copy, pointer-safety work

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions