[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 16:56:58 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang` at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/15667

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: AST/ByteCode/cxx20.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -cc1 -internal-isystem Z:\b\llvm-clang-x86_64-sie-win\build\lib\clang\21\include -nostdsysteminc -fcxx-exceptions -fexperimental-new-constant-interpreter -std=c++20 -verify=both,expected -fcxx-exceptions Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\AST\ByteCode\cxx20.cpp -DNEW_INTERP
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' -cc1 -internal-isystem 'Z:\b\llvm-clang-x86_64-sie-win\build\lib\clang\21\include' -nostdsysteminc -fcxx-exceptions -fexperimental-new-constant-interpreter -std=c++20 -verify=both,expected -fcxx-exceptions 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\AST\ByteCode\cxx20.cpp' -DNEW_INTERP
# .---command stderr------------
# | error: diagnostics with 'note' severity expected but not seen: 
# |   File Z:\b\llvm-clang-x86_64-sie-win\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 Z:\b\llvm-clang-x86_64-sie-win\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.
# `-----------------------------
# error: command failed with exit status: 1

--

********************


```

</details>

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


More information about the cfe-commits mailing list