mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 04:22:03 +00:00
Fix UBSan report in arrayCumSum
This commit is contained in:
parent
fd899daa00
commit
65902f4c6e
@ -53,7 +53,7 @@ struct ArrayCumSumImpl
|
|||||||
for (const auto * end = offsets + size; offsets < end; ++offsets)
|
for (const auto * end = offsets + size; offsets < end; ++offsets)
|
||||||
{
|
{
|
||||||
auto offset = *offsets;
|
auto offset = *offsets;
|
||||||
Src accumulated{};
|
Dst accumulated{};
|
||||||
for (; pos < offset; ++pos)
|
for (; pos < offset; ++pos)
|
||||||
{
|
{
|
||||||
accumulated += src_value;
|
accumulated += src_value;
|
||||||
@ -70,7 +70,7 @@ struct ArrayCumSumImpl
|
|||||||
for (const auto * end = offsets + size; offsets < end; ++offsets)
|
for (const auto * end = offsets + size; offsets < end; ++offsets)
|
||||||
{
|
{
|
||||||
auto offset = *offsets;
|
auto offset = *offsets;
|
||||||
Src accumulated{};
|
Dst accumulated{};
|
||||||
for (; pos < offset; ++pos)
|
for (; pos < offset; ++pos)
|
||||||
{
|
{
|
||||||
accumulated += src_values[pos];
|
accumulated += src_values[pos];
|
||||||
|
Loading…
Reference in New Issue
Block a user