llvm / llvm/llvm-project

[clang][analyzer][regression] scopes-cfg-output.cpp started to fail

Open
#192,297 1 comment 0 reactions 0 assignees View on GitHub
clang:analysis test-suite
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

`Clang :: Analysis/scopes-cfg-output.cpp` recently started to fail on aarch64.
The output from the logs is:

```
FAIL: Clang :: Analysis/scopes-cfg-output.cpp (1441 of 24313)
******************** TEST 'Clang :: Analysis/scopes-cfg-output.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/bin/clang -cc1 -internal-isystem /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/bin/../lib/clang/23/include -nostdsysteminc -analyze -setup-static-analyzer -fcxx-exceptions -fexceptions -analyzer-checker=debug.DumpCFG -analyzer-config cfg-scopes=true /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/clang/test/Analysis/scopes-cfg-output.cpp > /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/tools/clang/test/Analysis/Output/scopes-cfg-output.cpp.tmp 2>&1
# executed command: /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/bin/clang -cc1 -internal-isystem /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/bin/../lib/clang/23/include -nostdsysteminc -analyze -setup-static-analyzer -fcxx-exceptions -fexceptions -analyzer-checker=debug.DumpCFG -analyzer-config cfg-scopes=true /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/clang/test/Analysis/scopes-cfg-output.cpp
# RUN: at line 2
/builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/bin/FileCheck --input-file=/builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/tools/clang/test/Analysis/Output/scopes-cfg-output.cpp.tmp /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/clang/test/Analysis/scopes-cfg-output.cpp
# executed command: /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/bin/FileCheck --input-file=/builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/tools/clang/test/Analysis/Output/scopes-cfg-output.cpp.tmp /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/clang/test/Analysis/scopes-cfg-output.cpp
# .---command stderr------------
# | /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/clang/test/Analysis/scopes-cfg-output.cpp:1384:16: error: CHECK-NEXT: expected string not found in input
# | // CHECK-NEXT: 1: CFGScopeBegin(n2t)
# | ^
# | /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/tools/clang/test/Analysis/Output/scopes-cfg-output.cpp.tmp:1347:6: note: scanning from here
# | [B4]
# | ^
# | /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/tools/clang/test/Analysis/Output/scopes-cfg-output.cpp.tmp:1350:2: note: possible intended match here
# | 3: CFGScopeBegin(n2t)
# | ^
# |
# | Input file: /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/llvm/aarch64-redhat-linux-gnu/tools/clang/test/Analysis/Output/scopes-cfg-output.cpp.tmp
# | Check file: /builddir/build/BUILD/llvm-project-121f5a96ff38ec0c5d5f7274b1b0ca0df26a1cee/clang/test/Analysis/scopes-cfg-output.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 1342: 4: [B3.3] (ImplicitCastExpr, LValueToRValue, _Bool)
# | 1343: T: if [B3.4]
# | 1344: Preds (1): B5
# | 1345: Succs (2): B2 B1
# | 1346:
# | 1347: [B4]
# | next:1384'0 X error: no match found
# | 1348: 1: CFGScopeEnd(n1t)
# | next:1384'0 ~~~~~~~~~~~~~~~~~~~~~
# | 1349: 2: CFGScopeBegin(n1t)
# | next:1384'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 1350: 3: CFGScopeBegin(n2t)
# | next:1384'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | next:1384'1 ? possible intended match
# | 1351: T: goto label;
# | next:1384'0 ~~~~~~~~~~~~~~~~
# | 1352: Preds (1): B5
# | next:1384'0 ~~~~~~~~~~~~~~~
# | 1353: Succs (1): B1
# | next:1384'0 ~~~~~~~~~~~~~~~
# | 1354:
# | next:1384'0 ~
# | 1355: [B5]
# | next:1384'0 ~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
```

I managed to bisect this issue to https://github.com/llvm/llvm-project/pull/188421 .
However, it's unclear to me if it's just a coincidence this test started to fail after this PR.
Notice this issue has also appeared in another case: #165888 .

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.