[clang] [analyzer] Implemented the DanglingPtrDeref checker to detect use-after-scope lifetime errors (PR #206460)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 29 04:47:11 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 88440 tests passed
* 1694 tests skipped
* 1 test failed

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

### cross-project-tests
<details>
<summary>cross-project-tests.debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_list_aggregates.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp
# executed command: rm -rf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp
# note: command had no output on stdout or stderr
# RUN: at line 2
mkdir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp
# executed command: mkdir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp
# note: command had no output on stdout or stderr
# RUN: at line 3
clang++ -O0 -glldb -std=gnu++11 /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_list_aggregates.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp/test
# executed command: clang++ -O0 -glldb -std=gnu++11 /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_list_aggregates.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp/test
# note: command had no output on stdout or stderr
# RUN: at line 4
"/usr/bin/python3" "/home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/dexter.py" test --fail-lt 1.0 -w -v --debugger lldb-dap --lldb-executable "/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/lldb-dap" --dap-message-log=-e --use-script --binary /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp/test    --results-directory /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp/results -- /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_list_aggregates.cpp 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_list_aggregates.cpp
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/dexter.py test --fail-lt 1.0 -w -v --debugger lldb-dap --lldb-executable /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/lldb-dap --dap-message-log=-e --use-script --binary /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp/test --results-directory /home/gha/actions-runner/_work/llvm-project/llvm-project/build/projects/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/Output/rewrite_list_aggregates.cpp.tmp/results -- /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_list_aggregates.cpp
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_list_aggregates.cpp
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_list_aggregates.cpp:16:11: error: CHECK: expected string not found in input
# | // CHECK: Rewrote script to add 1 expected values.
# |           ^
# | <stdin>:1:1: note: scanning from here
# | note: Opening DAP server: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/lldb-dap
# | ^
# | <stdin>:54:5: note: possible intended match here
# |  "supportsClipboardContext": true,
# |     ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/rewriting/rewrite_list_aggregates.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: note: Opening DAP server: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/lldb-dap 
# | check:16'0    {                                                                                                        search range start (exclusive)
# | check:16'1                                                                                                             error: no match found in search range
# |             2: -> 0:00:000 { 
# |             3:  "type": "request", 
# |             4:  "command": "initialize", 
# |             5:  "arguments": { 
# |             6:  "clientID": "dexter", 
# |             .
# |             .
# |             .
# |            49:  } 
# |            50:  ], 
# |            51:  "supportTerminateDebuggee": true, 
# |            52:  "supportsBreakpointLocationsRequest": true, 
# |            53:  "supportsCancelRequest": true, 
# |            54:  "supportsClipboardContext": true, 
# | check:16'2         ?                                possible intended match
# |            55:  "supportsCompletionsRequest": true, 
# |            56:  "supportsConditionalBreakpoints": true, 
# |            57:  "supportsConfigurationDoneRequest": true, 
# |            58:  "supportsDataBreakpointBytes": true, 
# |            59:  "supportsDataBreakpoints": true, 
# |             .
# |             .
# |             .
# |          1661: missing_var_steps: 2 
# |          1662: unexpected_value_steps: 0 
# |          1663: correct_step_coverage: 0.0% (0/2) 
# |          1664: seen_values: 0 
# |          1665: missing_values: 1 
# |          1666:  
# | check:16'3      } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# 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/206460


More information about the cfe-commits mailing list