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

host resource memcpy undefined behavior #156

Open
MrBurmark opened this issue Sep 16, 2024 · 0 comments
Open

host resource memcpy undefined behavior #156

MrBurmark opened this issue Sep 16, 2024 · 0 comments

Comments

@MrBurmark
Copy link
Member

In playing with undefined behavior sanitizer I learned that it is undefined behavior to pass a nullptr to std::memcpy even if the count/size argument is 0, see https://en.cppreference.com/w/cpp/string/byte/memcpy.
Do we want to allow users to pass nullptr to camp::resources::Host::memcpy with a count/size of 0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant