Commit cbe6e0f7 authored by Ziye Yang's avatar Ziye Yang Committed by Tomasz Zawadzki
Browse files

posix: Fix the ASAN issue whiling using internal buffer.



Fixes #1314

Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
Change-Id: I096dcba3d5eea91e79680ce64e894e7f10028ad3
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1459


Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 38fb0e01
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ spdk_posix_sock_alloc_pipe(struct spdk_posix_sock *sock, int sz)
	}

	/* Round up to next 64 byte multiple */
	new_buf = calloc(((sz + 1) >> 6) << 6, sizeof(uint8_t));
	new_buf = calloc(SPDK_ALIGN_CEIL(sz + 1, 64), sizeof(uint8_t));
	if (!new_buf) {
		SPDK_ERRLOG("socket recv buf allocation failed\n");
		return -ENOMEM;