Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

libcu++ atomic fails to compile with address sanitizer (ASAN) enabled #142

Closed
maddyscientist opened this issue Mar 17, 2021 · 3 comments
Closed
Labels
bug: functional Does not work as intended. helps: quda Helps or needed by QUDA. libcu++ P1: should have Important but not necessary for release.
Milestone

Comments

@maddyscientist
Copy link
Collaborator

In testing libcu++ for deployment in QUDA, I found that libcu++ atomic fails to compile if address sanitizer is enabled.

$ nvcc bug.cu -o bug -arch=sm_70 -Xcompiler -fsanitize=address -Ilibcudacxx/include
libcudacxx/include/cuda/std/detail/libcxx/include/__config(1466): error: attributes are not allowed here

1 error detected in the compilation of "bug.cu".

Where bug.cu is simply the following

#include <cuda/atomic>
int main() { }

I note that this is blocking us from deploying libcu++ for production in QUDA, and forcing us to keep around legacy our legacy atomicAdd-based and cudaStream approach to reductions.

Tested on the latest release 1.4.1.

@brycelelbach
Copy link
Collaborator

@griwes thoughts

@ogiroux
Copy link
Contributor

ogiroux commented Mar 17, 2021

I took a quick look. There's a very special function at this line of code, some kind of compact between libcxx and ASAN, and it has one of the macros we modified applied to it. I bet that if we just unapplied our modified macro from it (after all, it's not a GPU function) then it would either pass or find the next error.

@brycelelbach brycelelbach added the P1: should have Important but not necessary for release. label Mar 29, 2021
@brycelelbach brycelelbach added this to the 2.0.0 milestone Mar 29, 2021
@brycelelbach brycelelbach added the bug: functional Does not work as intended. label Mar 29, 2021
@maddyscientist maddyscientist added the helps: quda Helps or needed by QUDA. label Apr 20, 2021
@jrhemstad jrhemstad added this to CCCL Aug 11, 2022
@miscco
Copy link
Collaborator

miscco commented Feb 23, 2023

This has been fixed by #206 AFAIK so closing

@miscco miscco closed this as completed Feb 23, 2023
@github-project-automation github-project-automation bot moved this to Done in CCCL Feb 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: functional Does not work as intended. helps: quda Helps or needed by QUDA. libcu++ P1: should have Important but not necessary for release.
Projects
Archived in project
Development

No branches or pull requests

5 participants