Skip to content

impeller::DlDispatcher::drawVertices stores a stale pointer #133813

@flar

Description

@flar

The Impeller dispatcher stores a copy to a pointer it is given that survives the method call:

https://github.com/flutter/engine/blob/df619c6a5237c2f82fd48806be2cfaf621024759/impeller/display_list/dl_dispatcher.cc#L968

It hands the pointer to the constructor of its own Vertices object which just saves it in a field:

https://github.com/flutter/engine/blob/df619c6a5237c2f82fd48806be2cfaf621024759/impeller/display_list/dl_vertices_geometry.cc#L68

The data should be copied out of the storage it is given as nowhere is it stated that the memory that is pointed to will be valid once the method returns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions