Re: [PATCH for 6.2] nbd/server: Silence clang sanitizer warning

2021-11-15 Thread Philippe Mathieu-Daudé
On 11/15/21 23:39, Eric Blake wrote: > clang's sanitizer is picky: memset(NULL, x, 0) is technically > undefined behavior, even though no sane implementation of memset() > deferences the NULL. Caught by the nbd-qemu-allocation iotest. > > The alternative to checking before each memset is to

[PATCH for 6.2] nbd/server: Silence clang sanitizer warning

2021-11-15 Thread Eric Blake
clang's sanitizer is picky: memset(NULL, x, 0) is technically undefined behavior, even though no sane implementation of memset() deferences the NULL. Caught by the nbd-qemu-allocation iotest. The alternative to checking before each memset is to instead force an allocation of 1 element instead of