[PATCH] D91765: [sanitizer_common] Add facility to get the full report path

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 23:24:19 PST 2020


tejohnson added inline comments.


================
Comment at: compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_test.cpp:11
+int main(int argc, char **argv) {
+  __sanitizer_set_report_path("/tmp/foobar");
+  printf("Path %s\n", __sanitizer_get_report_path());
----------------
vitalybuka wrote:
> it should not work on android
> 
> maybe this without FileCHeck?
> sprintf(buff, "%s.report_path", arg[0]);
>  __sanitizer_set_report_path(buff);
> assert(strncmp(buff, __sanitizer_get_report_path(), strlen(buff)) == 0)
> 
Good idea. But the assert won't work, because a ".${pid}" suffix will get added. But I can do a partial match using FileCheck.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91765/new/

https://reviews.llvm.org/D91765



More information about the llvm-commits mailing list