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
Some GTK objects declared in the Linux embedder contain instances of
std::functionFor example,
send_key_eventin_FlKeyEmbedderResponder.The
_FlKeyEmbedderResponderis initialized usingg_object_new.g_object_newappears to be zeroing out the entire_FlKeyEmbedderResponderstruct and is not calling constructors for any C++ object members within the struct.This will potentially fail on implementations of
std::functionthat 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 thestd::functionmembers crashes if the constructor has not run.@cbracken @robert-ancell