[compiler-rt] r343524 - Remove a path-length limitation for the xray logfile.
Douglas Yung via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 1 13:03:54 PDT 2018
Author: dyung
Date: Mon Oct 1 13:03:53 2018
New Revision: 343524
URL: http://llvm.org/viewvc/llvm-project?rev=343524&view=rev
Log:
Remove a path-length limitation for the xray logfile.
Reviewers: MaskRay
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52728
Patch by Jeremy Morse!
Modified:
compiler-rt/trunk/lib/xray/xray_utils.cc
Modified: compiler-rt/trunk/lib/xray/xray_utils.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_utils.cc?rev=343524&r1=343523&r2=343524&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_utils.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_utils.cc Mon Oct 1 13:03:53 2018
@@ -103,10 +103,9 @@ int getLogFD() XRAY_NEVER_INSTRUMENT {
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;
More information about the llvm-commits
mailing list