[PATCH] D52728: [XRay] Remove a path-length limitation

Douglas Yung via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 1 13:05:43 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL343524: Remove a path-length limitation for the xray logfile. (authored by dyung, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D52728?vs=167747&id=167805#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D52728

Files:
  compiler-rt/trunk/lib/xray/xray_utils.cc


Index: compiler-rt/trunk/lib/xray/xray_utils.cc
===================================================================
--- compiler-rt/trunk/lib/xray/xray_utils.cc
+++ compiler-rt/trunk/lib/xray/xray_utils.cc
@@ -103,10 +103,9 @@
   if (LastSlash != nullptr)
     Progname = LastSlash + 1;
 
-  const int HalfLength = sizeof(TmpFilename) / 2 - sizeof(TmpWildcardPattern);
   int NeededLength = internal_snprintf(
-      TmpFilename, sizeof(TmpFilename), "%.*s%.*s.%s", HalfLength,
-      flags()->xray_logfile_base, HalfLength, Progname, TmpWildcardPattern);
+      TmpFilename, sizeof(TmpFilename), "%s%s.%s",
+      flags()->xray_logfile_base, Progname, TmpWildcardPattern);
   if (NeededLength > int(sizeof(TmpFilename))) {
     Report("XRay log file name too long (%d): %s\n", NeededLength, TmpFilename);
     return -1;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52728.167805.patch
Type: text/x-patch
Size: 822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181001/9249aa9a/attachment.bin>


More information about the llvm-commits mailing list