-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCC doesn't properly deserialize from shared library base class pointers #117
Comments
I should also note that after haphazardly applying the |
I pulled down the recent @robertramey: Is there any additional information you might need to track this down further? I can try to convert the attached test case over to an actual test, although I'm unfamiliar with the code base. |
I believe we've resolved issues related to visibility. can this be closed now? |
@robertramey unfortunately this still looks like it's failing - although with the singleton fixes a few months ago it does get past the initial problem, but I think the main issue for this remains:
|
Randomly ran into this today and tried. Modified the reproducer only to show boost version and refactor the make file so I could grok the lines. reproduce_sehe.zip Tested fine for several releases:
|
This issue started around release 1.61 - this has held us back from updating Boost for sometime, however I never had time to report it since it seemed fairly complex.
I was able to narrow this down to a simple reproduce project, attached here: reproduce.zip
To reproduce:
This issue appears to be related to the combination of the following:
-fvisibility=hidden
compile flag set for the executable. Setting this to "default" seemed to allow it to work.boost::archive::binary_iarchive
presence seems to trigger this behavior. I suspect this causes a symbol to be emitted which actually triggers the root problem.I suspect this is in an issue with symbol visibility, where compiling/linking under -O1 or higher optimizes out symbols. I'm unsure why this resolves the issue however and at this point I can't seem to root cause the problem.
After playing around with
BOOST_SYMBOL_VISIBLE
in archive/serialization, adding it to the following appears to allow this to work correctly:class BOOST_SYMBOL_VISIBLE singleton
(boost/serialization/singleton.hpp)class BOOST_SYMBOL_VISIBLE iserializer : public basic_iserializer
(boost/archive/detail/iserializer.hpp)When I initially investigated this ~2 years ago I had bisected this problem down to the commit in 61b81fad. I noticed there had been several symbol changes since, so I'm not certain if this is actually the problem anymore.
Due to the nature of it touching singleton and symbols, this might be related to #104.
The text was updated successfully, but these errors were encountered: