[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/25516 Here is the r

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/24173 Here is the rel

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/14998 Here is the relevant pi

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
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 Here is the relevant

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/18865 Here is th

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn edited https://github.com/llvm/llvm-project/pull/137078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
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 Here is th

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 7 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/4024 Here is the re

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/15716 Here is the relevant pie

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/16533 Here is the relevant piece of the

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/21837 Here is

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
@@ -119,6 +119,15 @@ constexpr auto b3 = name1() == name1(); // ref-error {{must be initialized by a constexpr auto b4 = name1() == name2(); static_assert(!b4); +constexpr auto bar(const char *p) { return p + __builtin_strlen(p); } +constexpr auto b5 = bar(p1) == p1; +static_

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/23465

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn closed https://github.com/llvm/llvm-project/pull/137078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
@@ -119,6 +119,15 @@ constexpr auto b3 = name1() == name1(); // ref-error {{must be initialized by a constexpr auto b4 = name1() == name2(); static_assert(!b4); +constexpr auto bar(const char *p) { return p + __builtin_strlen(p); } +constexpr auto b5 = bar(p1) == p1; +static_

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Richard Smith via cfe-commits
zygoloid wrote: Yeah. I agree that using the overlap diagnostic only in the case where there's at least one byte of potential overlap (as this PR does) is best. https://github.com/llvm/llvm-project/pull/137078 ___ cfe-commits mailing list cfe-commits@

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: > Thanks for the fix! > > I was wondering if the new code paths should actually return `true` not > `false`, but I think it makes sense that for a comparison like `"hello" + 6 > == "world"`, we say that the strings are _not_ potentially-overlapping but we > instead detect the

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Thanks for the fix! I was wondering if the new code paths should actually return `true` not `false`, but I think it makes sense that for a comparison like `"hello" + 6 == "world"`, we say that the strings are *not* potentially-overlapping

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn created https://github.com/llvm/llvm-project/pull/137078 When `ArePotentiallyOverlappingStringLiterals`, added in https://github.com/llvm/llvm-project/pull/109208, compares string literals it drops the front of the string with the greatest offset from its base point

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes When `ArePotentiallyOverlappingStringLiterals`, added in https://github.com/llvm/llvm-project/pull/109208, compares string literals it drops the front of the string with the greatest offset from its bas