[all-commits] [llvm/llvm-project] e757c4: [LinkerWrapper] Fix memory issues due to unguarded...

Joseph Huber via All-commits all-commits at lists.llvm.org
Mon Feb 6 10:05:46 PST 2023


  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: e757c4d1d0ca113c207458c67c73f703bd479f82
      https://github.com/llvm/llvm-project/commit/e757c4d1d0ca113c207458c67c73f703bd479f82
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

  Log Message:
  -----------
  [LinkerWrapper] Fix memory issues due to unguarded accesses to global state

There were intemittent errors in the linker wrapper when using the
sanitizers in parallel. First, this is because the `TempFiles` global
was not guarded when creating a new file. Second, even though the `Args`
list is passed as const, the internal state is mutable when adding a
string. So that needs to be guarded too.

Fixes https://github.com/llvm/llvm-project/issues/60437

Reviewed By: tianshilei1992

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

(cherry picked from commit 9c4591d7f3acaa00318900bdba4b4ba26c99c666)




More information about the All-commits mailing list