This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new dec7fac0d6d [Bug](ip) fixed uint128 constructor in not align address
(#57371)
dec7fac0d6d is described below
commit dec7fac0d6de4de521686b87295985ee2e2584a1
Author: HappenLee <[email protected]>
AuthorDate: Wed Oct 29 01:19:53 2025 +0800
[Bug](ip) fixed uint128 constructor in not align address (#57371)
### What problem does this PR solve?
ipv6 use uint128 to construct, but the mem access in storage engine in
not align address may cause O3 coredump
---
be/src/olap/types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/src/olap/types.h b/be/src/olap/types.h
index 7ff538418ae..3133f7615df 100644
--- a/be/src/olap/types.h
+++ b/be/src/olap/types.h
@@ -1020,7 +1020,7 @@ struct FieldTypeTraits<FieldType::OLAP_FIELD_TYPE_IPV6>
}
static std::string to_string(const void* src) {
- uint128_t value = *reinterpret_cast<const uint128_t*>(src);
+ uint128_t value = unaligned_load<uint128_t>(src);
IPv6Value ipv6_value(value);
return ipv6_value.to_string();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]