[llvm-bugs] [Bug 49750] New: llvm::writeArchive(..) fails when path contains %
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Mar 28 12:10:34 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49750
Bug ID: 49750
Summary: llvm::writeArchive(..) fails when path contains %
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Object
Assignee: unassignedbugs at nondot.org
Reporter: kevin at segfault.fun
CC: llvm-bugs at lists.llvm.org
If the filesystem path passed to writeArchive(..) contains a `%` it will fail
with "No such directory". I believe this is because sys::fs::createUniquePath()
gets called and replaces all `%` with a random number. It looks like
sys::fs::TempFile::create(Prefix + ".temp-archive-%%%%%%%.a") is common in the
LLVM tree, and `Prefix` is assumed to contain no `%` characters. Not exactly
sure how LLVM wants to resolve this, but my suggestion would be to take
direction from the `mktemp` API.
Downstream bug reported here: https://github.com/rust-lang/rust/issues/79567
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210328/95c89744/attachment.html>
More information about the llvm-bugs
mailing list