Skip to content

Program exits instead of handling malloc failure gracefully in internal_init() #10

@mpap10

Description

@mpap10

We are researchers from the University of Athens, working on cross-language analysis of Python packages with C/C++ native extensions.

Description

Τhe interval_init() function [1] checks whether malloc() [2] fails, but exits the program instead of handling the error gracefully.

Potential Improvement

It would be nice to handle memory allocations gracefully, instead of exiting the process as we do now.

References

[1]

interval_t *interval_init(uint32_t start, uint32_t end, int32_t id_value)

[2]
interval_t *i = (interval_t *)malloc(sizeof(interval_t));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions