[compiler-rt] [sanitizer] Fix running sanitizer_set_report_path_test on Android (PR #99469)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 14:54:44 PDT 2024
================
@@ -14,13 +15,14 @@ int main(int argc, char **argv) {
sprintf(buff, "%s.report_path/report", argv[0]);
__sanitizer_set_report_path(buff);
assert(strncmp(buff, __sanitizer_get_report_path(), strlen(buff)) == 0);
- printf("Path %s\n", __sanitizer_get_report_path());
- fflush(stdout);
+ sprintf(buff, "Path %s\n", __sanitizer_get_report_path());
+ write(STDERR_FILENO, buff, strlen(buff));
----------------
vitalybuka wrote:
`fprintf(stderr, ....)` looks nicer to me, but we can avoid printing them at all
https://github.com/llvm/llvm-project/pull/99469
More information about the llvm-commits
mailing list