Skip to content

Minimal broken example of inappropriate linking #1636

@amosbird

Description

@amosbird

Hi! I've been told several years ago that LD_PRELOAD is required to override a default malloc in dynamic executables. Recently I'm fighting with various crashes due to bad linking of jemalloc. The current solution I used is to use static version of jemalloc and only link libjemalloc.a to the final executable. This works well, however, I still don't have a clear mind of how others don't work. https://www.gnu.org/software/libc/manual/html_node/Replacing-malloc.html also mentions some failures when linking inappropriately, but without a real example. I think a minimal broken example would help developers understanding how to avoid common link failures, and catch potential bugs if any.

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