aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-12-18 15:46:44 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2020-12-18 15:46:44 -0500
commit21b2ee6ee376c0c9d05dd1edfa8d68c87ffcbd0a (patch)
tree0121a770c79bd082d39eff430e5735345c49c551 /src/backend/utils/adt/jsonfuncs.c
parent48cbed8821120b378e22be1f0d3cfcf61ef0d1e4 (diff)
downloadpostgresql-21b2ee6ee376c0c9d05dd1edfa8d68c87ffcbd0a.tar.gz
postgresql-21b2ee6ee376c0c9d05dd1edfa8d68c87ffcbd0a.zip
Avoid memcpy() with same source and destination during relmapper init.
A narrow reading of the C standard says that memcpy(x,x,n) is undefined, although it's hard to envision an implementation that would really misbehave. However, analysis tools such as valgrind might whine about this; accordingly, let's band-aid relmapper.c to not do it. See also 5b630501e, d3f4e8a8a, ad7b48ea0, and other similar fixes. Apparently, none of those folk tried valgrinding initdb? This has been like this for long enough that I'm surprised it hasn't been reported before. Back-patch, just in case anybody wants to use a back branch on a platform that complains about this; we back-patched those earlier fixes too. Discussion: https://postgr.es/m/161790.1608310142@sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions