Hi, On Fri, May 24, 2019 at 5:10 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > > didier <did...@gmail.com> 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 > > -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, Not that much, make check has only this one.
> and most of them are pretty hypothetical. Well there's no point for this line even without ASAN, why call memset on header_done but not on width_header, width_average, and so on? ASAN complaining at runtime because memset is called with a null ptr and a zero count is just the nudge for removing it. Regards Didier