Skip to content

runtime module allocation checker #32

Description

@xxshady

research if it's possible to add some checks to #[global_allocator] to prevent memory misuse

example misuse:

  1. module A creates Vec
  2. *mut Vec is passed via host to module B (different global allocator)
  3. module B pushes something to the vec, tries to dellocate old allocation (owned by module A)
  4. boom
  • check in dealloc if pointer is known
  • somehow check if module allocation is still alive when it's dereferenced from host binary or other module
  • what about references to static variables?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions