Modify

Opened 3 weeks ago

#13308 new Bugs

Asio symbols are exported even when they should not

Reported by: Jan Patera <japa@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.64.0 Severity: Showstopper
Keywords: asio mac macos symbols visibility Cc:

Description

Since the changeset 382804a4325b0e3b90d07f6563f5c6fd13a38052 (Use default visibility everywhere), the asio symbols are always exported on macOS even with visibility=hidden. I.e. contary what the changeset comment says. Not only it gives a bigger footprint (see ticket #12722), but it also has functional impliciations on macOS: When multiple modules export the same symbol, the macOS somehow randomly determines which instance of the symbol will be used by which module that needs it. I.e. when modules A and B export the same symbol, and module A needs to call it, then it can happen that the module A actually calls the symbol exported from B. Weird things begin to happen not only when A and B were built with different versions of boost. In practice, we are hitting this issue with our plugins for Adobe Illustrator. Illustrator itself was built with boost of some (unknown) version which is probably different in different releases of Illustrator. Our plugins are built with boost 1.59, 1.61, 1.64 and we are getting almost identical issues with all of them: the macOS decides to link our plugins to the boost symbols exported by Adobe Illustrator although our plugins carry all the required functions. The symptoms are that our plugins hang because some boost functions are called inside our plugin and some inside Illustrator itself leading to inconstistent state, esp. when different boost versions are used. The solution here is to really hide the boost asio symbols when building with visibility=hidden which is the way we build our plugins. In the attachment you can find a solution for the issue: the symbol visibility of asio now really follows the default visibility.

Attachments (1)

boost_asio_symbol_visibility.patch (3.0 KB) - added by Jan Patera <japa@…> 3 weeks ago.
Patch for proper handling visibility with gcc and clang

Download all attachments as: .zip

Change History (1)

Changed 3 weeks ago by Jan Patera <japa@…>

Patch for proper handling visibility with gcc and clang

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain chris_kohlhoff.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.