Page MenuHomePhabricator

[clang-tidy] Fix crashes in bugprone-bad-signal-to-kill-thread check.
AbandonedPublic

Authored by ArcsinX on Aug 5 2020, 6:43 AM.

Details

Summary

This patch fixes crashes in the following cases:

  • SIGTERM is not a literal
  • SIGTERM is a literal but Token::PtrData == nullptr (happens in clangd, because clang-tidy in clangd has some limitations to ensure reasonable performance)
  • SIGTERM undefined after definition

Diff Detail

Event Timeline

ArcsinX created this revision.Aug 5 2020, 6:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2020, 6:43 AM
ArcsinX requested review of this revision.Aug 5 2020, 6:43 AM
Eugene.Zelenko added a project: Restricted Project.

while this patch fixes multiple issues (as described in the message), I'd suggest splitting it.

while this patch fixes multiple issues (as described in the message), I'd suggest splitting it.

Thanks for you suggestion.

SIGTERM is not a literal

D85398

SIGTERM is a literal but Token::PtrData == nullptr (happens in clangd, because clang-tidy in clangd has some limitations to ensure reasonable performance)

For this I will create after if/when previous one will be accepted. Seems it's more related to clangd then clang-tidy.

SIGTERM undefined after definition

D85401

ArcsinX abandoned this revision.Aug 5 2020, 11:59 PM