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

[BUG]: __sanitizer_annotate_contiguous_container definition in libcu++ conflicts with libc++ #2789

Closed
1 task done
Artem-B opened this issue Nov 13, 2024 · 0 comments · Fixed by #2793
Closed
1 task done
Labels
bug Something isn't working right.

Comments

@Artem-B
Copy link
Contributor

Artem-B commented Nov 13, 2024

Is this a duplicate?

Type of Bug

Compile-time Error

Component

libcu++

Describe the bug

Attempting to compile host-side CUDA code with clang -fsanitize=address fails with conflicting function redeclaration:

In file included from /opt/compiler-explorer/cuda/12.6.1/include/cub/device/device_copy.cuh:42:
In file included from /opt/compiler-explorer/cuda/12.6.1/include/cub/detail/nvtx.cuh:49:
In file included from /opt/compiler-explorer/cuda/12.6.1/include/cub/detail/nvtx3.hpp:631:
In file included from /opt/compiler-explorer/clang-trunk-20241112/bin/../include/c++/v1/string:595:
/opt/compiler-explorer/clang-trunk-20241112/bin/../include/c++/v1/__debug_utils/sanitizers.h:24:1: error: __host__ function '__sanitizer_annotate_contiguous_container' cannot overload __host__ __device__ function '__sanitizer_annotate_contiguous_container'
   24 | __sanitizer_annotate_contiguous_container(const void*, const void*, const void*, const void*);
      | ^
/opt/compiler-explorer/cuda/12.6.1/include/cuda/std/detail/libcxx/include/__config:1434:1: note: previous declaration is here
 1434 | __sanitizer_annotate_contiguous_container(const void*, const void*, const void*, const void*);
      | ^
1 error generated when compiling for host.
Compiler returned: 1

How to Reproduce

https://godbolt.org/z/sMfxKP7hM

Expected behavior

Making __sanitizer_annotate_contiguous_container a __host__ function avoids the problem.

Reproduction link

https://godbolt.org/z/sMfxKP7hM

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

@Artem-B Artem-B added the bug Something isn't working right. label Nov 13, 2024
@github-project-automation github-project-automation bot moved this to Todo in CCCL Nov 13, 2024
miscco added a commit to miscco/cccl that referenced this issue Nov 13, 2024
It does conflict with libc++

Fixes NVIDIA#2789
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Nov 13, 2024
miscco added a commit that referenced this issue Nov 13, 2024
It does conflict with libc++

Fixes #2789
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Nov 13, 2024
trxcllnt pushed a commit to trxcllnt/cccl that referenced this issue Nov 23, 2024
It does conflict with libc++

Fixes NVIDIA#2789
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant