Ryan McMahon created GEODE-5079: ----------------------------------- Summary: Investigate why dynamic_cast fails when visibility is set to 'hidden' by default in Clang Key: GEODE-5079 URL: https://issues.apache.org/jira/browse/GEODE-5079 Project: Geode Issue Type: Bug Components: native client Reporter: Ryan McMahon
We should investigate why symbols aren't fully exported when specifying 'CXX_VISIBILITY_PRESET hidden' and aliasing with the 'using' keyword i.e. ``` using CacheableBytes = CacheableArray<int8_t, GeodeTypeIds::CacheableBytes> ``` The immediate fix was to set visibility to 'default' for Clang only (https://issues.apache.org/jira/browse/GEODE-5067), but it would be good to better understand 'hidden' visibility causes problems. The issue can be reproduced by reverting Clang back to 'default' visibility and running the testThinClientBigValue test. We identified that if we do not alias with 'using' and explicitly define the class e.g. CacheableBytes and decorate that class with APACHE_GEODE_EXPORT, then this seems to resolve the issue when using 'hidden' by default on Clang. However, it seems cumbersome to explicitly define all these classes just to solve this particular issue. Some potentially relevant stackoverflow posts include: https://stackoverflow.com/questions/19496643/using-clang-fvisibility-hidden-and-typeinfo-and-type-erasure [https://stackoverflow.com/questions/5116333/dynamic-cast-failed-when-hiding-symbol] -- This message was sent by Atlassian JIRA (v7.6.3#76005)