mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-11 09:25:20 +00:00
Fix sanitizer errors in posix socket (#2331)
This commit is contained in:
parent
c39eb46b6f
commit
569f702ec2
|
@ -37,7 +37,7 @@ typedef struct AtomicWaitNode {
|
|||
static HashMap *wait_map;
|
||||
|
||||
static uint32
|
||||
wait_address_hash(void *address);
|
||||
wait_address_hash(const void *address);
|
||||
|
||||
static bool
|
||||
wait_address_equal(void *h1, void *h2);
|
||||
|
@ -174,7 +174,7 @@ shared_memory_set_memory_inst(WASMModuleCommon *module,
|
|||
|
||||
/* Atomics wait && notify APIs */
|
||||
static uint32
|
||||
wait_address_hash(void *address)
|
||||
wait_address_hash(const void *address)
|
||||
{
|
||||
return (uint32)(uintptr_t)address;
|
||||
}
|
||||
|
|
|
@ -275,6 +275,9 @@ os_socket_recv_from(bh_socket_t socket, void *buf, unsigned int len, int flags,
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
memset(src_addr, 0, sizeof(*src_addr));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user