Skip to content

wasm-backend: initial stack position doesn't take into account data+bss size #8905

Closed
@sbc100

Description

@sbc100

Under the wasm backend we are setting the stack position using --initial-stack-pointer argument to wasm-emscripten-finalize. The value we pass is calculated based on STATIC_BUMP, but STACK_BUMP is set from the output of wasm-emscripten-finalize. This means that static data and bss effectively end up occupying the end (low addresses) of the stack.

Given a small stack and a large data/bss section the stack would overlaps completely with the static data!

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