Skip to content

The dsymutil tool left a directory in the tmpdir. #61920

@578559967

Description

@578559967

dsymutil creates a temporary directory in tmpdir when it's working, but forgets to remove it upon exiting.
This issue has been present since Clang 14.0.3 or earlier, but not before 14.0.0.
It causes Golang compilation to fail on macOS. See golang/go#59026.

Here is how to reproduce:

$ cat test.c
#include <stdio.h>

int main() {
  printf("hello\n");
}

$ mkdir tmp

$ TMPDIR=$PWD/tmp clang test.c -o test.o -ggdb -c

$ ls tmp

$ TMPDIR=$PWD/tmp clang test.o -o test -ggdb

$ ls tmp

$ TMPDIR=$PWD/tmp dsymutil -f test -o test.k

$ ls tmp
dsymutil-5f58bc

$ clang --version                                                                                                                                                                                                                            
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Until Clang 15.0.7, this issue still exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    llvm-toolsAll llvm tools that do not have corresponding tag

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions