未验证 提交 087be05d 编写于 作者: A alexey-milovidov 提交者: GitHub

Merge pull request #22062 from ClickHouse/datetime64-ubsan

Fix UBSan report in TransformDateTime64
......@@ -49,8 +49,11 @@ public:
{}
template <typename ... Args>
inline auto execute(const DateTime64 & t, Args && ... args) const
inline auto NO_SANITIZE_UNDEFINED execute(const DateTime64 & t, Args && ... args) const
{
/// Type conversion from float to integer may be required.
/// We are Ok with implementation specific result for out of range and denormals conversion.
if constexpr (TransformHasExecuteOverload_v<DateTime64, decltype(scale_multiplier), Args...>)
{
return wrapped_transform.execute(t, scale_multiplier, std::forward<Args>(args)...);
......
-- The result is unspecified but UBSan should not argue.
SELECT ignore(addHours(now64(3), inf)) FROM numbers(2);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册