Skip to content

init_once makes it possible to allocate with one malloc and free with another #671

@gbaraldi

Description

@gbaraldi

This was found in JuliaLang/julia#60568 when running the MinFEM tests with that PR, specifically the poisson_test.jl file. Basically what seems to happen is that umfpack_dl_numeric calls SuiteSparse_malloc which before calling into CHOLMOD points to the libc allocator, but after we initialize it in init_once it points to the jl_malloc allocator. Currently this doesn't cause segfaults but will cause the GC to miscount, but with mimalloc this segfaults. That initialization needs to either be a init or be called whenever any function may call any of the SuiteSparse_malloc and related

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