Re: [HACKERS] Small fix: avoid passing null pointers to memcpy() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()
Date
Msg-id 15347.1558710650@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()  (didier <did447@gmail.com>)
Responses Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()  (didier <did447@gmail.com>)
Re: [HACKERS] Small fix: avoid passing null pointers to memcpy()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
didier <did447@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,
and most of them are pretty hypothetical.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Sascha Kuhl
Date:
Subject: Contribute - money
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Runtime Partition Pruning