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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: didier <did447(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()
Date: 2019-05-24 15:10:50
Message-ID: 15347.1558710650@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

didier <did447(at)gmail(dot)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,
and most of them are pretty hypothetical.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-05-24 15:16:53 Re: BUG #15819: wrong expression in document of pgbench
Previous Message Sascha Kuhl 2019-05-24 15:07:15 Contribute - money