-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[clangd] Buffer overflow on completion request #132169
Comments
@llvm/issue-subscribers-clangd Author: Henry Chu (henryhchchc)
For the following C code snippet:
int main(int argc, char **argv) {
// {{'กssss'?}}
return 423;
} A
|
Where can one get a clangd build with ASAN enabled to test this? |
I compiled clangd with the following commands git clone --depth=1 --branch=llvmorg-20.1.0 https://github.com/llvm/llvm-project.git /llvm
mkdir /llvm/build
export LLVM_ROOT=/llvm
cd /llvm/build
CC=clang CXX=clang++ CFLAGS='-fsanitize=address' CXXFLAGS='-fsanitize=address' \
cmake $LLVM_ROOT/llvm/ \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \
-DLLVM_ENABLE_LTO=true \
-DLLVM_USE_LINKER=lld
CC=clang CXX=clang++ CFLAGS='-fsanitize=address' CXXFLAGS='-fsanitize=address' \
cmake --build . --target clangd Do you want me to upload the binary to facilitate testing? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the following C code snippet:
A
textDocument/completion
at the beginning of the blank line causesglobal-buffer-overflow
(caught by ASAN).The text was updated successfully, but these errors were encountered: