search for: createtemporaryfile

Displaying 20 results from an estimated 22 matches for "createtemporaryfile".

2014 Jul 23
2
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
Hi, all. I noticed recently that llvm::sys::fs::createTemporaryFile does not use llvm::sys::path::system_temp_directory, instead relying on its platform-specific helper TempFile. Is there any reason for this disparity? The two implementations are not in sync, either: - TempDir honors TMPDIR, TMP, TEMP, TEMPDIR, and a configuration-settable P_tmpdir on Unix-y syst...
2014 Jul 25
2
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
...ve in their respective Path.inc files. On Thu, Jul 24, 2014 at 9:44 AM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > > On 2014-Jul-23, at 15:26, Jordan Rose <jordan_rose at apple.com> wrote: > > > > Hi, all. I noticed recently that llvm::sys::fs::createTemporaryFile does > not use llvm::sys::path::system_temp_directory, instead relying on its > platform-specific helper TempFile. Is there any reason for this disparity? > > > > The two implementations are not in sync, either: > > > > - TempDir honors TMPDIR, TMP, TEMP, TEMPDIR, and...
2014 Aug 13
2
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
> It looks like OS X always has TMPDIR set these days (to the value of > _CS_DARWIN_USER_TEMP_DIR), so I think we should just go with TMPDIR if it's > set and non-empty, and then fall back to confstr. However, we should not be > using TMPDIR if ErasedOnReboot is false (i.e. if we'd prefer > _CS_DARWIN_USER_CACHE_DIR). Unfortunately there's no canonical environment >
2014 Aug 14
2
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
> Well, that changes behavior on Linux; previously it did honor TMPDIR when > looking for a cache directory. Is that okay? (The Windows version is also > honoring TEMP in this case.) I *think* that is a bug fix. I don't have those env variables set on my linux machine (fedora 20), but I don't remember seeing them pointing to anything but /tmp in the past and that is even in
2014 Jul 25
2
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
On Jul 25, 2014, at 13:44 , Rafael Espíndola <rafael.espindola at gmail.com> wrote: > On 25 July 2014 16:31, David Majnemer <david.majnemer at gmail.com> wrote: >> I have a few concerns: >> 1. GetTempPathW is buggy, we should be manually using >> GetEnvironmentVariableW with TMP, TEMP and USERPROFILE arguments and use the >> first that exists. >> 2. We
2014 Aug 09
2
[LLVMdev] sys::path::system_temp_directory vs. sys::fs::createTemporaryFile
On 25 July 2014 17:57, David Majnemer <david.majnemer at gmail.com> wrote: > To be clear, I don't think we need both; I'd like for us to drop one of > them. I just want to make sure that that the final state, post merge, works > well on all of our platforms. :) Cool. The attached patch removes TempDir. It passes all tests, but the OS X case looks a bit suspicious. I first
2005 Jan 27
0
[LLVMdev] Building the llvm runtime: 'Can't destroy file: Theprocess cannot access the fi
...Error 2 > ------------------------- > > Like before, the temporary file libc.bca-000000 doesn't exist when finished. > But libc.bca exists. Here's what's happening in the archiver. It is creating libc.bca. The way it does that is to create a temporary file using the Path::createTemporaryFile. The file with the -000000 suffix is the temporary file that gets renamed as libc.bca when llvm-ar is finished build it. So, I think what is going on is that the file is being renamed correctly but Win32/Path.inc is throwing an exception anyway (where the error message comes from) and llvm-ar retur...
2005 Jan 27
2
[LLVMdev] Building the llvm runtime: 'Can't destroy file: Theprocess cannot access the fi
>From: Jeff Cohen Date: Wed, 26 Jan 2005 19:47:44 -0800 > >Fixed. Yes, now it isn't the path. I've recorded this trace: ------------------------- llvm[3]: Building Debug Bytecode Archive libc.bca /bin/rm -f /C/projects/build/MinGW/llvm-4-1/Debug/lib/libc.bca /C/projects/build/MinGW/llvm-4-1/Debug/bin/llvm-ar rcsf /C/projects/build/MinGW/llvm-4-1/Debug/lib/libc.bca
2018 Mar 27
4
[pre-RFC] Data races in concurrent ThinLTO processes
...roblems and start the discussion about potential solutions. I would like to get your feedback. Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp std::error_code EC = sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); if (EC) { errs() << "Error: " << EC.message() << "\n"; report_fatal_error("ThinLTO: Can't get a temporary file"); } { raw_fd_ostream OS(TempFD, /* ShouldClose */ true); OS <&lt...
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...ur feedback. > > > > > > *Problem #1: In certain common situations, ‘rename’ can fail, causing a > data race later on.* > > Look at the following code in the function ‘write’ in > ThinLTOCodeGenerator.cpp > > > > *std::error_code EC =* > > * sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename);* > > *if (EC) {* > > * errs() << "Error: " << EC.message() << "\n";* > > * report_fatal_error("ThinLTO: Can't get a temporary file");* > > *}* > > *{* >...
2005 Jan 28
1
[LLVMdev] Building the llvm runtime: 'Can't destroy file: Theprocess cannot access the fi
...>>Like before, the temporary file libc.bca-000000 doesn't exist when finished. >>But libc.bca exists. >> >> > >Here's what's happening in the archiver. It is creating libc.bca. The >way it does that is to create a temporary file using the >Path::createTemporaryFile. The file with the -000000 suffix is the >temporary file that gets renamed as libc.bca when llvm-ar is finished >build it. So, I think what is going on is that the file is being renamed >correctly but Win32/Path.inc is throwing an exception anyway (where the >error message comes from) a...
2018 Mar 27
2
[pre-RFC] Data races in concurrent ThinLTO processes
...roblems and start the discussion about potential solutions. I would like to get your feedback. Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp std::error_code EC = sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); if (EC) { errs() << "Error: " << EC.message() << "\n"; report_fatal_error("ThinLTO: Can't get a temporary file"); } { raw_fd_ostream OS(TempFD, /* ShouldClose */ true); OS <&lt...
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...potential solutions. I would like to get your feedback. > > > Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. > Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp > > std::error_code EC = > sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); > if (EC) { > errs() << "Error: " << EC.message() << "\n"; > report_fatal_error("ThinLTO: Can't get a temporary file"); > } > { > raw_fd_ostream OS(TempFD, /* Shou...
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...ur feedback. > > > > > > *Problem #1: In certain common situations, ‘rename’ can fail, causing a > data race later on.* > > Look at the following code in the function ‘write’ in > ThinLTOCodeGenerator.cpp > > > > *std::error_code EC =* > > * sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename);* > > *if (EC) {* > > * errs() << "Error: " << EC.message() << "\n";* > > * report_fatal_error("ThinLTO: Can't get a temporary file");* > > *}* > > *{* >...
2018 Mar 27
1
[pre-RFC] Data races in concurrent ThinLTO processes
...roblems and start the discussion about potential solutions. I would like to get your feedback. Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp std::error_code EC = sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); if (EC) { errs() << "Error: " << EC.message() << "\n"; report_fatal_error("ThinLTO: Can't get a temporary file"); } { raw_fd_ostream OS(TempFD, /* ShouldClose */ true); OS <&lt...
2018 Mar 22
0
[pre-RFC] Data races in concurrent ThinLTO processes
...potential solutions. I would like to get your feedback. > > > Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. > Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp > > std::error_code EC = > sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); > if (EC) { > errs() << "Error: " << EC.message() << "\n"; > report_fatal_error("ThinLTO: Can't get a temporary file"); > } > { > raw_fd_ostream OS(TempFD, /* Shou...
2018 Mar 22
4
[pre-RFC] Data races in concurrent ThinLTO processes
...t the discussion about potential solutions. I would like to get your feedback. Problem #1: In certain common situations, 'rename' can fail, causing a data race later on. Look at the following code in the function 'write' in ThinLTOCodeGenerator.cpp std::error_code EC = sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); if (EC) { errs() << "Error: " << EC.message() << "\n"; report_fatal_error("ThinLTO: Can't get a temporary file"); } { raw_fd_ostream OS(TempFD, /* ShouldClose */ true); OS <&lt...
2018 Mar 27
2
[pre-RFC] Data races in concurrent ThinLTO processes
...l solutions. I would like to get your feedback. > > > *Problem #1: In certain common situations, ‘rename’ can fail, causing a > data race later on.* > Look at the following code in the function ‘write’ in > ThinLTOCodeGenerator.cpp > > *std::error_code EC =* > * sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename);* > *if (EC) {* > * errs() << "Error: " << EC.message() << "\n";* > * report_fatal_error("ThinLTO: Can't get a temporary file");* > *}* > *{* > * raw_fd_ostream OS(Tem...
2017 Nov 09
10
Experiment on how to improve our temporary file handing.
Currently a power failure or other hard crash can cause lld leave a temporary file around. The same is true for other llvm tools. As an example, put a breakpoint in Writer.cpp:236 ("writeBuildId()") and restart the run a few times. You will get t.tmp43a735a t.tmp4deeabb t.tmp9bacdd3 t.tmpe4115c4 t.tmpeb01fff The same would happen if there was a fatal error between the
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...d like to get your feedback. >> >> >> Problem #1: In certain common situations, ‘rename’ can fail, causing a data race later on. >> Look at the following code in the function ‘write’ in ThinLTOCodeGenerator.cpp >> >> std::error_code EC = >> sys::fs::createTemporaryFile("Thin", "tmp.o", TempFD, TempFilename); >> if (EC) { >> errs() << "Error: " << EC.message() << "\n"; >> report_fatal_error("ThinLTO: Can't get a temporary file"); >> } >> { >> raw_fd_os...