[PATCH] D87792: [sanitizer] Add facility to print the full StackDepot

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 17:18:37 PDT 2020


tejohnson added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cpp:117-141
+TEST(SanitizerCommon, StackDepotPrint) {
+  uptr array1[] = {1, 2, 3, 4, 7};
+  StackTrace s1(array1, ARRAY_SIZE(array1));
+  u32 i1 = StackDepotPut(s1);
+  uptr array2[] = {1, 2, 3, 4, 8, 9};
+  StackTrace s2(array2, ARRAY_SIZE(array2));
+  u32 i2 = StackDepotPut(s2);
----------------
vitalybuka wrote:
> vitalybuka wrote:
> > something like that should work
> ```
>  EXPECT_NE(i1, i2);
> - StackDepotPrintAll();
> ```
Thanks for the tip, that greatly simplifies the change!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87792



More information about the llvm-commits mailing list