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

AddressSanitizer: memcpy-param-overlap not triggered if both parameters are equal #1793

Open
StarStarJ opened this issue Sep 7, 2024 · 0 comments

Comments

@StarStarJ
Copy link

StarStarJ commented Sep 7, 2024

int a = 0;
// no err - wrong
memcpy(&a, &a, 1);
// err
memcpy(&a, ((char*)&a) + 1, 2);

version:

clang --version
Debian clang version 20.0.0 (++20240903111917+8861328303a5-1~exp1~20240903112058.2312)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-20/bin
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