Skip to content

memory safety bug with enqueueMap* #43

@andreasgal

Description

@andreasgal

mPtr is assigned to the pointer returned by enqueue and it is then wrapped into a buffer. The buffer is returned. If the user does an enqueueUnmap*, mPtr is freed, but the buffer object might still be around, and accessing that is bad news.

To make matters worse, ArrayBuffers can be sliced and TypedArray views can be wrapped around them, and all those instances become unsafe.

No trivial fix for this, except copying, which would suck.

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