[PATCH] D67671: compiler-rt/lib/tsan: allow the Go runtime to return multiple stack frames for a single PC

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 11:53:09 PDT 2019


dvyukov added a comment.

Besides the nits, are you sure we reconstruct the list in the right order? :)
Did you test it with the Go counterpart? There is that buildgo.sh script that builds new syso file, which you can copy into Go runtime/race.
It would also be nice to have an output test for inlined frames here:
https://github.com/golang/go/blob/master/src/runtime/race/output_test.go
It needs to go with the updated syso files, but you could use it for testing now.
Fingers crossed nothing broke since last syso update.



================
Comment at: lib/tsan/go/tsan_go.cpp:60
+  SymbolizedStack *s = first;
+  while(true) {
+    SymbolizeCodeContext cbctx;
----------------
space before (
and generally do for (;;) for this, at least in tsan code


================
Comment at: lib/tsan/go/tsan_go.cpp:65
+    go_runtime_cb(CallbackSymbolizeCode, &cbctx);
+    if (cbctx.res == 0) {
+      break;
----------------
no {} around 1-statement blocks


================
Comment at: lib/tsan/go/tsan_go.cpp:75
+
+    if (cbctx.pc == addr) { // outermost (non-inlined) function
+      break;
----------------
no {} around 1-statement blocks


Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D67671





More information about the llvm-commits mailing list