<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/153112>153112</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] bugprone-signal-handler only looks for signal(), not sigaction()
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tavianator
</td>
</tr>
</table>
<pre>
I tried to use the bigprone-signal-handler check to find signal safety issues, but it didn't find any, even when I added `malloc(1)` into my signal handler. Looking closer, it seems to check for `signal()` calls, but not `sigaction()` calls: https://github.com/llvm/llvm-project/blob/c4160343741731680359feb2652aa9e4d2376e31/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp#L356-L357
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUUs2O2zwMfBr5QiSQKP8efPi-XRhdYG99AllibHUVKbDktHn7QnbS3ebWkw1xOORwRsVoJ0_Us-p_Vr0Wak1zWPqkrlZ5lcJSjMHc-jdIiyUDKcAaCdJMMNrpsgRPh0yg3GFW3jhaQM-kPzLwZL2BvQhRnSjdwMa4UmT4AuOawCYw1niGTdrByt9yja7k4edMHt5AGUMGWM3PyrmgGbaCYcdqDtanAOfbY8J9_BHeQ_iwfgLtQqQl89kEkegc81L7dqewZM69lWF7p9TKuT_b-ZDuGKWTDf4ZJv-DOaVL_mE4MBwmm-Z1POpwZjg4d318Dpcl_CCdGA6jCyPDQZei5rKUTSkaKeqWy6o70Yh1hUp1VBqUTU1SZKhTfjqkEFw80K-0qM83a26Zct1tYDh83-R82w_xkoUe9eXCUL7Lqj68y6opTC9NJztVUC-aquxqXsqmmHtViqrTom2EOY2N0ZK4aXjHEbHtFMfC9six4q1ALjhHPNaaWhqxRCM7rUXHSk5nZd0xSz6GZSo2s3tRSSGwcGokF7eUIX4VgDl1S78dalynyErubEzxkyfZ5LZ8fmmrXuEh_Dl_wbsbuBA-4mbzXx7jy2brk6fFurj-n718ZHm4K7z2-DsAAP__hWcPtA">