[Boost-bugs] [Boost C++ Libraries] #13308: Asio symbols are exported even when they should not

Subject: [Boost-bugs] [Boost C++ Libraries] #13308: Asio symbols are exported even when they should not
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-11-22 09:36:26


#13308: Asio symbols are exported even when they should not
-----------------------------------------------+---------------------------
 Reporter: Jan Patera <japa@…> | Owner:
                                               | chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.64.0 | Severity: Showstopper
 Keywords: asio mac macos symbols visibility |
-----------------------------------------------+---------------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13308>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-11-22 09:43:00 UTC