Skip to content

[BoundsSafety] Support counted_by on void * (1-byte element semantics) #11807

@rapidsna

Description

@rapidsna

Enable counted_by attribute on void * pointers to align with upstream behavior.

Changes needed:

  • Clang codegen: Handle void * with counted_by
  • Consteval: Treat void * as 1-byte element size

Upstream treats void * with counted_by as an array of 1-byte elements. Our implementation for -fbounds-safety should match this behavior to prevent divergence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:bounds-safetyIssue relating to the experimental -fbounds-safety feature in Clang

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions