[all-commits] [llvm/llvm-project] e257c0: [clang][clangd] Ensure the stack bottom before bui...

zyn0217 via All-commits all-commits at lists.llvm.org
Sat Sep 2 03:53:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e257c0a9190637e44e292271103a13d70bec4b03
      https://github.com/llvm/llvm-project/commit/e257c0a9190637e44e292271103a13d70bec4b03
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2023-09-02 (Sat, 02 Sep 2023)

  Changed paths:
    M clang-tools-extra/clangd/ClangdServer.cpp
    M clang-tools-extra/clangd/TUScheduler.cpp
    M clang-tools-extra/clangd/index/Background.cpp
    A clang-tools-extra/clangd/test/infinite-instantiation.test
    M clang-tools-extra/clangd/tool/ClangdMain.cpp
    M clang/lib/Frontend/FrontendAction.cpp

  Log Message:
  -----------
  [clang][clangd] Ensure the stack bottom before building AST

`clang::runWithSufficientStackSpace` requires the address of the
initial stack bottom to prevent potential stack overflows.

In addition, add a fallback to ASTFrontendAction in case any client
forgets to call it when not through CompilerInstance::ExecuteAction,
which is rare.

Fixes https://github.com/clangd/clangd/issues/1745.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D158967




More information about the All-commits mailing list