[PATCH] D91765: [sanitizer_common] Add facility to get the full report path
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 23:40:08 PST 2020
vitalybuka accepted this revision.
vitalybuka 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());
----------------
tejohnson wrote:
> 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.
Hm, here we suppose to match only strlen(buff) first byte
assert(strncmp(buff, sanitizer_get_report_path(), strlen(buff)) == 0)
either ways is fine
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