Skip to content

Commit caaa557

Browse files
committed
resolve some comments
1 parent 905e59e commit caaa557

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_file.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ void ReportFile::SetReportPath(const char *path) {
164164
const char *message = "ERROR: Path is too long: ";
165165
WriteToFile(kStderrFd, message, internal_strlen(message));
166166
WriteToFile(kStderrFd, path, 8);
167-
WriteToFile(kStderrFd, "\n", internal_strlen("\n"));
167+
message = "...\n";
168+
WriteToFile(kStderrFd, message, internal_strlen(message));
168169
Die();
169170
}
170171
}

compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_fail.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ int main(int argc, char **argv) {
1212
sprintf(buff, "%s/report", argv[0]);
1313
// ERROR1: Can't create directory: {{.*}}
1414
} else {
15+
// Try setting a path that is too large.
1516
snprintf(buff, sizeof(buff), "%04095d", 42);
16-
// ERROR2: Path is too long: 00000000
17+
// ERROR2: Path is too long: 00000000...
1718
}
1819
__sanitizer_set_report_path(buff);
1920
}

0 commit comments

Comments
 (0)