-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: goinge: embedderUsers of the Embedder APIUsers of the Embedder APIengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
We already do this for iOS and Android. We used to have a check that queried global symbols that tripped if unexpected symbols were found. We depended on this check for the embedder dylib as well. Some time ago, this post link check was replaced by a linker script that finely controlled the exposed symbols. The linker script was not applied to the embedder API dylibs.
This caused the issue in #106118. The chronology of events:
- 4 months ago, FreeType was rolled to 2.11.1 in Roll FreeType to a version based on 2.11.1 engine#31678. This roll included a change to the GN rule where the
FT_PUBLIC_FUNCTION_ATTRIBUTEwas unset. The defaultFT_PUBLIC_FUNCTION_ATTRIBUTEimplementation unsets symbol visibility which engine builds set tohidden. Now FreeType symbols were exposed by the embedder API dylibs (found usingnm --dynamic). customer: vroomrolls in the embedder dylib. This embedder also depends on libfreetype2 and there are symbol overrides.- The symbol visibility leak is patched in https://flutter-review.googlesource.com/c/third_party/freetype2/+/31480
- The embedder works around the issue using
RTLD_DEEPBINDin [engine] 3.x x86_64 embedder segfaults #106118 (comment)
We should guarantee that no symbols used by the internal dependencies of Flutter leak from the Flutter engine dylib accidentally. we can either do this via a linker script like the Android or iOS embedders or via a post link check (or both).
cmc5788
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: goinge: embedderUsers of the Embedder APIUsers of the Embedder APIengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team