https://bugs.llvm.org/show_bug.cgi?id=37091

            Bug ID: 37091
           Summary: clang-tidy (and possibly other tools) leave temporary
                    files behind
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: david.stenb...@ericsson.com
                CC: llvm-bugs@lists.llvm.org

After the following commit was introduced: 

    Author: Ilya Biryukov <ibiryu...@google.com>
    Date:   Mon Mar 19 14:19:58 2018 +0000

    Changed createTemporaryFile without FD to actually create a file.

    Summary:
    This commit changes semantics of createUniqueFile and
    createTemporaryFile variants that do not return file descriptors.
    Previously they only checked if files exist, therefore being subject
    to race conditions. Now they will create an empty file to avoid them.

    Functions that do not create a file are now called
    getPotentiallyUniqueTempFileName and getPotentiallyUniqueFileName.

    Reviewers: klimek, bkramer, krasimir, JDevlieghere, espindola

    Reviewed By: klimek

    Subscribers: llvm-commits

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

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327851
91177308-0d34-0410-b5e6-96231b3b80d8

we have encountered cases where clang-tidy leaves behind temporary files. This
might also be the case for other tools, but I have not verified that.

When e.g. running the following:

  ( export TMPDIR=tmpdir; rm -rf $TMPDIR; mkdir $TMPDIR;
    clang-tidy empty-file.c -- --target=mips64 )

a placeholder-*.s file is left in $TMPDIR:

  $ ls tmpdir/
  placeholder-601760.s

A temporary file is created when specifying the following targets: mips64,
mips64el, msp430, nios2, r600, amdgcn, sparc, sparcv9, sparcel, tce, tcele,
xcore, nvptx, nvptx64, le64, spir, spir64, renderscript32, renderscript64.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to