__tsan_get_report_thread and others can crash if a stack trace is missing, let's add the missing checks.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/tsan/rtl/tsan_debugging.cc | ||
---|---|---|
89 ↗ | (On Diff #51136) | Do you want to return 0 in the case stack was a nullptr? |
compiler-rt/trunk/lib/tsan/rtl/tsan_debugging.cc | ||
---|---|---|
105 | Obviously, my question related to every API function that copies traces ;) |
compiler-rt/trunk/lib/tsan/rtl/tsan_debugging.cc | ||
---|---|---|
105 | Hm, I think there are situations when a stack trace is missing, but the rest of the output data is still valid. I think we should still return a success even when the trace is not available. The above (__tsan_get_report_stack) is different, since it *only* returns a stack trace... |
compiler-rt/trunk/lib/tsan/rtl/tsan_debugging.cc | ||
---|---|---|
105 | Ok, fair enough. |
Obviously, my question related to every API function that copies traces ;)