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
dynamic_cast form pointers not working with clang ndk 18, 19, 20 on arm64 #1075
Comments
have you followed the steps on that bug to use |
Yes, i tried that. I found that when the destruction are moved to cpp file, the typeinfo is GLOBAL, otherwise, it's WEAK. |
My environment is on windows-x86-64, i'm curious why it works on armv7. |
This is expected behavior. |
do you mean destructor can't be inline? it's definitely a bug of compiler. Why close this??? |
It's not a compiler bug. This is how the C++ ABI is defined. Your classes need a key function. |
|
The only information I have to go on is what you provided. Can you provide instructions to reproduce your issue?
armv8 as in arm64, or 32-bit Arm with |
CMake instruction for armv7 CMake instruction for armv8; Host machine is windows and ndk version r18,r19,r20 have the same issue. |
That's not sufficient. We need the code that has the failing behavior. |
Code as in a failing test case, I see your project and the snippet, but I don't know how they fit together. Did you try switching from bfd to lld or gold? |
it's rather complex to reproduce the issue since it's a system project. It's related to the geometry visualization, geometry modeling. So i just can provide the code snippet of the problem. |
I find the same issue reproduced on MAC. |
The default linker is: On MAC Could you tell how to switch the linker in cmake? |
Add |
I have tried gold linker, it makes no difference. |
Renamed as .txt because github won't let me upload a .so, but here you are: libc++_shared.so.txt It's built from the r20 branch, so it should work with what you have. |
(reopening while we continue investigating) |
It's no lucky to make it work even with your provided libc++_shared.so. |
Looking forward this to be fixed in R20. Because Google Play don't allow to submit APP without 64 bit APK since August 1st, 2019, this issue blocked our APP to Google Play. Do you think it's possible to fix it in R20 branch? Thanks for your hard working in advance. |
Unfortunately there's very little we can do to fix this if we can't reproduce the issue. Our guesses so far have been wrong (or, if the original guess that it's a problem of a missing key function, it's not confirmed, but it isn't for at least The bright side is that it does seem you have a workaround:
|
I have being working on this blocking issue for several months. I'm really really so frustrated. |
Closing for lack of info. lmk if you're able to reduce a test case so we can investigate. |
The issue is reproduced with OCCT code base:
https://tracker.dev.opencascade.org/view.php?id=30937
Code snippet as below:
TDF_Attribute* aNSA = new TNaming_NamedShape();
TNaming_NamedShape* aNS = dynamic_cast<TNaming_NamedShape*>(aNSA);
if(!aNS )
{
std::cout << "Serious bug occured"; // bug here
}
Above code works with armv7, and it's just not working on arm64-v8a
after moving the inline destruction to cpp file, it works.
This issue is very similar to: #519
I'm not sure it's the same bug.
The text was updated successfully, but these errors were encountered: