envoyproxy / envoyproxy/nighthawk
Strict-aliasing check failed on network/io_socket_handle_impl.cc
- Dominant language
- C++
- Stars
- 414
- Forks
- 95
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 11
Description
I'm getting this error on Ubuntu 18.04 LTS:
```
ERROR: /home/ratnadeepb/.cache/bazel/_bazel_ratnadeepb/8e0b5e402998bbf3306b4e75f900aaf2/external/envoy/source/common/network/BUILD:12:1: C++ compilation of rule '@envoy//source/common/network:address_lib' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 85 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
external/envoy/source/common/network/io_socket_handle_impl.cc: In member function 'virtual Envoy::Api::IoCallUint64Result Envoy::Network::IoSocketHandleImpl::sendmsg(const Envoy::Buffer::RawSlice*, uint64_t, int, const Envoy::Network::Address::Ip*, const Envoy::Network::Address::Instance&)':
external/envoy/source/common/network/io_socket_handle_impl.cc:150:69: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
*(reinterpret_cast(pktinfo->ipi6_addr.s6_addr)) = self_ip->ipv6()->address();
^
external/envoy/source/common/network/io_socket_handle_impl.cc:150:71: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
*(reinterpret_cast(pktinfo->ipi6_addr.s6_addr)) = self_ip->ipv6()->address();
```
Contributor guide
Assessment
This issue has not been assessed yet.