Michael Smith has uploaded this change for review. ( https://gerrit.cloudera.org/25349
Change subject: IMPALA-15745: Fix out-of-bounds reads found by clang-analyzer-security.ArrayBound ...................................................................... IMPALA-15745: Fix out-of-bounds reads found by clang-analyzer-security.ArrayBound operator<<(ostream&, __int128_t) negated negative values as signed __int128_t, which overflows for the minimum value and left it negative. No parts were then produced and parts[-1] was read. Compute the magnitude as __uint128_t instead, and use a do/while loop so at least one part is always produced. Add LoggingSupport.PrintInt128 to cover boundary values, including the minimum and maximum __int128_t. ShortDayName(), LongDayName(), ShortMonthName() and LongMonthName() indexed name tables with DayOfWeek()/Month() minus one without checking whether those returned NULL (e.g. for a timestamp without a date), which reads index -1. Return NULL (or an empty std::string for the std::string-returning variants) in that case. Previously the std::string variants also returned NULL, which constructs a std::string from a null pointer. clang-analyzer-security.ArrayBound remains disabled in .clang-tidy: most of its remaining reports are false positives, including ones inside LLVM, boost, opentelemetry-cpp and rapidjson headers that cannot be suppressed at the reporting location. Change-Id: I3bd608a2098ab1dd161975bb81ba399a84f5d330 Assisted-by: Claude Opus (GitHub Copilot) --- M be/src/common/logging.cc M be/src/exprs/timestamp-functions-ir.cc M be/src/util/logging-support-test.cc 3 files changed, 43 insertions(+), 8 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/49/25349/1 -- To view, visit https://gerrit.cloudera.org/25349 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3bd608a2098ab1dd161975bb81ba399a84f5d330 Gerrit-Change-Number: 25349 Gerrit-PatchSet: 1 Gerrit-Owner: Michael Smith <[email protected]>
