Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()

2019-05-26 Thread didier
Hi, On Fri, May 24, 2019 at 6:35 PM Tom Lane wrote: > These seem to be down to use of AnyArrayType: > > typedef union AnyArrayType > { > ArrayType flt; > ExpandedArrayHeader xpn; > } AnyArrayType; > > ASAN seems to believe that use of this union entitles the compiler to >

Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()

2019-05-24 Thread Tom Lane
I wrote: > didier writes: >> Without this patch make check fails 3 tests if pg is compiled with >> -fsanitize=address,undefined > ... but if that's the only evidence of an actual problem, I can't > get excited about it. ASAN complains about many things in Postgres, > and most of them are pretty

Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()

2019-05-24 Thread didier
Hi, On Fri, May 24, 2019 at 5:10 PM Tom Lane wrote: > > didier writes: > > A smaller version removing memset in print_aligned_text function. > > The line is redundant , header_done isn't used yet and it's either > > pg_malloc0 or null. > > Hm, I see the theoretical problem ... > > > Without

Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()

2019-05-24 Thread Tom Lane
didier writes: > A smaller version removing memset in print_aligned_text function. > The line is redundant , header_done isn't used yet and it's either > pg_malloc0 or null. Hm, I see the theoretical problem ... > Without this patch make check fails 3 tests if pg is compiled with >

Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()

2019-05-24 Thread didier
Hi A smaller version removing memset in print_aligned_text function. The line is redundant , header_done isn't used yet and it's either pg_malloc0 or null. Without this patch make check fails 3 tests if pg is compiled with -fsanitize=address,undefined diff --git a/src/fe_utils/print.c