Skip to content
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

Enable more strict dynamic cast checks #1873

Open
bettinaheim opened this issue Jul 1, 2024 · 0 comments
Open

Enable more strict dynamic cast checks #1873

bettinaheim opened this issue Jul 1, 2024 · 0 comments
Labels
build The issue related to the CUDA Quantum build

Comments

@bettinaheim
Copy link
Collaborator

When adding support for libc++, I needed to configure the LLVM build to enable more permissive dynamic casts, that fall back to string comparison and accept the cast despite differences in the static definitions. While this is the default behavior with gcc, the fact that we clearly rely on this could cause hard to debug problems. I think most likely, we have class definitions for the simulator states that are in header files, causing potential ambiguity in the dynamic casting.
I think we need to make a pass over the code base more generally to more carefully examine our header files and reduce them to declarations only to avoid potential compatibility issues. For anything that is defined in a header file, it should be save to compile it with a different toolchain than CUDA-Q and still work the same way when linked together with pre-built CUDA-Q libraries.

@bettinaheim bettinaheim added the build The issue related to the CUDA Quantum build label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The issue related to the CUDA Quantum build
Projects
None yet
Development

No branches or pull requests

1 participant