wee_alloc icon indicating copy to clipboard operation
wee_alloc copied to clipboard

Possible allocator memory corruption?

Open SUPERCILEX opened this issue 3 years ago • 1 comments

Describe the Bug

Unfortunately, I'm not sure. Using wee_alloc causes bugs in Bevy, suggesting a bug somewhere in the allocator.

Steps to Reproduce

See https://github.com/bevyengine/bevy/issues/3763

Expected Behavior

No memory corruption bugs.

Actual Behavior

Memory corruption.

SUPERCILEX avatar Jan 30 '22 01:01 SUPERCILEX

it also seems to never actually free any memory and will eventually oom even with the most basic bevy app. Screenshot from 2022-03-05 23-13-36

#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

#[wasm_bindgen]
pub fn run() {
    App::new()
        .add_plugins(DefaultPlugins)
        .run();
}

using the default allocator works as expected Screenshot from 2022-03-05 23-29-59

TomPridham avatar Mar 06 '22 06:03 TomPridham