Commit 42c906bc authored by Med Ismail Bennani's avatar Med Ismail Bennani
Browse files

[lldb/API] Fix non null-terminated stop-reason in SBThread::GetStopDescription



When trying to get the stop reason description using the SB API, the
buffer fetched was not null-terminated causing failures on the sanitized bot.

This patch should address those failures.

Signed-off-by: default avatarMed Ismail Bennani <medismail.bennani@gmail.com>
parent bab99345
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ size_t SBThread::GetStopDescription(char *dst, size_t dst_len) {
      StopInfoSP stop_info_sp = exe_ctx.GetThreadPtr()->GetStopInfo();
      if (stop_info_sp) {
        const char *stop_desc =
            exe_ctx.GetThreadPtr()->GetStopDescription().data();
            exe_ctx.GetThreadPtr()->GetStopDescription().c_str();
        if (stop_desc) {
          if (dst)
            return ::snprintf(dst, dst_len, "%s", stop_desc);