Summary: We are seeing crashes which comes from the initialization of the static global variable. This particular variable is used only in a single function that was never invoked. So moving it into the scope of the function will at least solve the problem. The real issue still requires some deep investigation though.
Test Plan: unitest under folly passed
Reviewed By: subodh@fb.com
Subscribers: seanc, njormrod
FB internal diff:
D1598048
Tasks:
5316441
namespace folly {
-static IPAddressV4 loopback_addr("127.0.0.0");
// free functions
size_t hash_value(const IPAddressV4& addr) {
}
bool IPAddressV4::isLoopback() const {
+ static IPAddressV4 loopback_addr("127.0.0.0");
return inSubnetWithMask(loopback_addr, fetchMask(8));
}
private:
union AddressStorage {
+ static_assert(sizeof(in_addr) == sizeof(ByteArray4),
+ "size of in_addr and ByteArray4 are different");
in_addr inAddr_;
ByteArray4 bytes_;
AddressStorage() {