Skip to content

Commit

Permalink
Fix decimal to real asan stack-use-after-scope error (#8780)
Browse files Browse the repository at this point in the history
ref #8285
  • Loading branch information
yibin87 authored Feb 22, 2024
1 parent 82a13c4 commit cab8352
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dbms/src/Functions/FunctionsTiDBConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,8 @@ struct TiDBConvertToFloat

for (size_t i = 0; i < size; ++i)
{
auto & field = (*col_from)[i].template safeGet<DecimalField<FromFieldType>>();
auto raw_field = (*col_from)[i];
const auto & field = raw_field.template safeGet<DecimalField<FromFieldType>>();
vec_to[i] = toFloat(field);
}
}
Expand Down

0 comments on commit cab8352

Please sign in to comment.