Closed
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
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
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Drop unused sanitizer hook
Drop unused sanitizer hook (#2793)
Drop unused sanitizer hook (NVIDIA#2793)