Skip to content

malloc/realloc with a zero size may return a null pointer on success #11634

Closed
@thestinger

Description

@thestinger

An expression like ~() will call malloc(0) and abort if it returns a null pointer. This may also a waste of memory on implementations where it does return a non-null pointer like glibc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions