[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-03-06 Thread via cfe-commits
NagyDonat wrote: Yup, there is no need to backport this. https://github.com/llvm/llvm-project/pull/79446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-03-06 Thread Balazs Benics via cfe-commits
steakhal wrote: I'm thinking of backporting this to clang-18, but given that it's only developer-facing, I don't think it worth it. WDYT @NagyDonat? https://github.com/llvm/llvm-project/pull/79446 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/79446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/79446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/79446 >From 2a1bb37fef538ecfde67f10c50df07100cc3b69a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 25 Jan 2024 14:13:03 +0100 Subject: [PATCH 1/2] [analyzer] Avoid a crash in a debug printou

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/79446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread Balazs Benics via cfe-commits
@@ -3270,8 +3270,12 @@ void RangeConstraintManager::printJson(raw_ostream &Out, ProgramStateRef State, void RangeConstraintManager::printValue(raw_ostream &Out, ProgramStateRef State, SymbolRef Sym) { const RangeSet RS = getRange(Stat

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/79446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread via cfe-commits
NagyDonat wrote: When I added `RangeConstraintManager::printValue()` calls at the top of `evalBinOpNN` (while doing printf-style debugging), I got crashes from the test files `infeasible-sink.c` and `constant-folding-crash.cpp`. I'd guess that getting an empty range set stops the analysis quic

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread Balazs Benics via cfe-commits
steakhal wrote: When is it possible to have an empty range set as a constraint? https://github.com/llvm/llvm-project/pull/79446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (NagyDonat) Changes Previously the function `RangeConstraintManager::printValue()` crashed when it encountered an empty rangeset (because `RangeSet::getBitwidth()` and `RangeSet::isUnsigned()` assert that the ranges

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/79446 Previously the function `RangeConstraintManager::printValue()` crashed when it encountered an empty rangeset (because `RangeSet::getBitwidth()` and `RangeSet::isUnsigned()` assert that the rangeset is not empt