Skip to content

"disable jemalloc" option for config.toml no longer (fully) disables jemalloc #48370

Closed
@nikomatsakis

Description

@nikomatsakis

If you set use-jemalloc to false in your config.toml, but then attempt to use the resulting binary with massif, you get weird errors in the regex parser. This gist gives precise reproduction instructions:

https://gist.github.com/nikomatsakis/246baafb1c1c60212e36541ec70ca852

@julian-seward1 tracked this down to incompletely intercepting all calls to jemalloc. As they wrote over IRC:

So, some part of your executable is compiled against jemalloc 4.5.0. massif intercepts some vanilla malloc, free, etc, calls and it segfaults

Here is a relevant stack trace:

https://pastebin.mozilla.org/9078214

which shows a transition from heap.rs:dealloc() to jemalloc.c:sdallocx().

cc @alexcrichton -- any theories?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions