Skip to content

Linux/GTK embedder is placing C++ std::function instances within GTK objects #140183

Closed
flutter/engine
#49293
@jason-simmons

Description

@jason-simmons

Some GTK objects declared in the Linux embedder contain instances of std::function

For example, send_key_event in _FlKeyEmbedderResponder.

The _FlKeyEmbedderResponder is initialized using g_object_new. g_object_new appears to be zeroing out the entire _FlKeyEmbedderResponder struct and is not calling constructors for any C++ object members within the struct.

This will potentially fail on implementations of std::function that depend on proper construction. Specifically, in flutter/engine#49002 we tried to upgrade to a new version of the libcxx ABI and found that usage of the std::function members crashes if the constructor has not run.

@cbracken @robert-ancell

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktopengineflutter/engine repository. See also e: labels.platform-linuxBuilding on or for Linux specificallyr: fixedIssue is closed as already fixed in a newer versionteam-linuxOwned by the Linux platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions