Skip to content

std.uni in debug library does invalid things with GC memory #10785

Closed

Description

@schveiguy

in std.uni, the destructor for the CowArray!GcPolicy sets the data in the referenced array to a sentinel value.

However, if this is called from a GC finalizer, the memory referenced may be invalid.

The debug code should be instrumented to check GC.inFinalizer before writing the sentinel. Or we just get rid of the sentinel setting, as it's not that critical of a debug tool to have at the cost of segfaults.

Activity

  1. added 4 commits that reference this issue on May 21, 2025
    f0facb5
    4548ce3
    2f06ad4
    11830d5
  2. added a commit that references this issue on May 22, 2025
    35637c1
  3. added theissue type on Feb 17, 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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions