[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)
LLVM Continuous Integration via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 23 17:02:18 PDT 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-b-1` while building `clang` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/13648
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
[832/1384] Running the Clang regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using clang: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/clang
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find cir-opt in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find clang-repl in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/wasm-ld
-- Testing: 22372 tests, 60 workers --
Testing:
FAIL: Clang :: AST/ByteCode/cxx20.cpp (56 of 22372)
******************** TEST 'Clang :: AST/ByteCode/cxx20.cpp' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/lib/clang/21/include -nostdsysteminc -fcxx-exceptions -fexperimental-new-constant-interpreter -std=c++20 -verify=both,expected -fcxx-exceptions /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/AST/ByteCode/cxx20.cpp -DNEW_INTERP # RUN: at line 1
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/lib/clang/21/include -nostdsysteminc -fcxx-exceptions -fexperimental-new-constant-interpreter -std=c++20 -verify=both,expected -fcxx-exceptions /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/AST/ByteCode/cxx20.cpp -DNEW_INTERP
error: diagnostics with 'note' severity expected but not seen:
File /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/AST/ByteCode/cxx20.cpp Line 127 'expected-note': comparison against pointer '&"test1"[6] + 1' that points past the end of a complete object has unspecified value
error: diagnostics with 'note' severity seen but not expected:
File /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/AST/ByteCode/cxx20.cpp Line 127: comparison against pointer '&"test1"[6]' that points past the end of a complete object has unspecified value
2 errors generated.
--
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
********************
Failed Tests (1):
Clang :: AST/ByteCode/cxx20.cpp
Testing Time: 141.73s
Total Discovered Tests: 46809
Skipped : 8 (0.02%)
Unsupported : 908 (1.94%)
Passed : 45865 (97.98%)
Expectedly Failed: 27 (0.06%)
Failed : 1 (0.00%)
[1382/1384] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
FAILED: tools/clang/test/CMakeFiles/check-clang /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/tools/clang/test/CMakeFiles/check-clang
cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/tools/clang/test && /usr/bin/python3.10 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/./bin/llvm-lit -sv --param USE_Z3_SOLVER=0 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/tools/clang/test
ninja: build stopped: subcommand failed.
['ninja', '-C', '/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx', 'check-llvm', 'check-clang', 'check-lld'] exited with return code 1.
@@@STEP_FAILURE@@@
Step 7 (check) failure: check (failure)
...
[832/1384] Running the Clang regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using clang: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/clang
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find cir-opt in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find clang-repl in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/wasm-ld
-- Testing: 22372 tests, 60 workers --
Testing:
FAIL: Clang :: AST/ByteCode/cxx20.cpp (56 of 22372)
******************** TEST 'Clang :: AST/ByteCode/cxx20.cpp' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/lib/clang/21/include -nostdsysteminc -fcxx-exceptions -fexperimental-new-constant-interpreter -std=c++20 -verify=both,expected -fcxx-exceptions /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/AST/ByteCode/cxx20.cpp -DNEW_INTERP # RUN: at line 1
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/lib/clang/21/include -nostdsysteminc -fcxx-exceptions -fexperimental-new-constant-interpreter -std=c++20 -verify=both,expected -fcxx-exceptions /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/AST/ByteCode/cxx20.cpp -DNEW_INTERP
error: diagnostics with 'note' severity expected but not seen:
File /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/AST/ByteCode/cxx20.cpp Line 127 'expected-note': comparison against pointer '&"test1"[6] + 1' that points past the end of a complete object has unspecified value
error: diagnostics with 'note' severity seen but not expected:
File /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/AST/ByteCode/cxx20.cpp Line 127: comparison against pointer '&"test1"[6]' that points past the end of a complete object has unspecified value
2 errors generated.
--
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
********************
Failed Tests (1):
Clang :: AST/ByteCode/cxx20.cpp
Testing Time: 141.73s
Total Discovered Tests: 46809
Skipped : 8 (0.02%)
Unsupported : 908 (1.94%)
Passed : 45865 (97.98%)
Expectedly Failed: 27 (0.06%)
Failed : 1 (0.00%)
[1382/1384] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
FAILED: tools/clang/test/CMakeFiles/check-clang /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/tools/clang/test/CMakeFiles/check-clang
cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/tools/clang/test && /usr/bin/python3.10 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/./bin/llvm-lit -sv --param USE_Z3_SOLVER=0 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx/tools/clang/test
ninja: build stopped: subcommand failed.
['ninja', '-C', '/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-mxhadbqx', 'check-llvm', 'check-clang', 'check-lld'] exited with return code 1.
program finished with exit code 0
elapsedTime=1145.517387
```
</details>
https://github.com/llvm/llvm-project/pull/137078
More information about the cfe-commits
mailing list