Skip to content

Non-atomic memory is cleared twice #14677

@BlobCodes

Description

@BlobCodes

Bug Report

When allocating non-atomic memory using the pointer_malloc or allocate primitives, crystal currently always inserts a LLVM memset intrinsic [1] [2] to clear the malloc-d memory.

However, bdwgc already ensures that all memory allocated using GC.malloc is cleared - so this is actually unnecessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugA bug in the code. Does not apply to documentation, specs, etc.topic:compiler:codegen

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions