Skip to content

Allocator inconsistency between bin and dylib #28850

Closed
@tsurai

Description

@tsurai

I recently had a problem with a dylib causing a segfault when triggering drop in an object passed to it from a rust binary.

jethrogb on the #rust irc channel found out that rustc build the dylib with alloc_system and the binary with alloc_jemalloc leading to all kinds of memory problems. I am not sure if this could be considered a bug or just a lack of documentation/warnings.

Another problem is that there seems to be no good way to fix this problem because #![feature(alloc_jemalloc)] requires nightly and building the dylib with -C prefer-dynamic makes the lib depend on rust std lib to be installed on the host machine.

Please correct me if I'm missing something

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