You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Blake Bender (Jira)" <ji...@apache.org> on 2020/03/12 14:26:00 UTC
[jira] [Closed] (GEODE-5079) Investigate why dynamic_cast fails
when visibility is set to 'hidden' by default in Clang
[ https://issues.apache.org/jira/browse/GEODE-5079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Blake Bender closed GEODE-5079.
-------------------------------
> 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
> Priority: Major
>
> 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
(v8.3.4#803005)