Skip to content

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

Open
@schveiguy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions