[clang] [analyzer] Fix null-pointer dereference in PthreadLockChecker (PR #210912)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 21 11:52:45 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 55777 tests passed
* 1408 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.Analysis/pthreadlock.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -analyze -setup-static-analyzer    -analyzer-checker=alpha.unix.PthreadLock    -verify C:\_work\llvm-project\llvm-project\clang\test\Analysis\pthreadlock.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -analyze -setup-static-analyzer -analyzer-checker=alpha.unix.PthreadLock -verify 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\pthreadlock.c'
# .---command stderr------------
# | error: 'expected-warning' diagnostics seen but not expected: 
# |   File C:\_work\llvm-project\llvm-project\clang\test\Analysis\pthreadlock.c Line 24: shift count >= width of type
# |   File C:\_work\llvm-project\llvm-project\clang\test\Analysis\pthreadlock.c Line 26: shift count >= width of type
# |   File C:\_work\llvm-project\llvm-project\clang\test\Analysis\pthreadlock.c Line 33: shift count >= width of type
# |   File C:\_work\llvm-project\llvm-project\clang\test\Analysis\pthreadlock.c Line 35: shift count >= width of type
# | 4 errors generated.
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/210912


More information about the cfe-commits mailing list