forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit53d4f5f
committed
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 reallymisbehave. However, analysis tools such as valgrind might whine aboutthis; accordingly, let's band-aid relmapper.c to not do it.See also5b63050,d3f4e8a,ad7b48e, and other similar fixes.Apparently, none of those folk tried valgrinding initdb? This has beenlike this for long enough that I'm surprised it hasn't been reportedbefore.Back-patch, just in case anybody wants to use a back branch on a platformthat complains about this; we back-patched those earlier fixes too.Discussion:https://postgr.es/m/161790.1608310142@sss.pgh.pa.us1 parent2e0fedf commit53d4f5f
1 file changed
+9
-2
lines changedLines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
928 | 928 |
| |
929 | 929 |
| |
930 | 930 |
| |
931 |
| - | |
932 |
| - | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
933 | 940 |
| |
934 | 941 |
| |
935 | 942 |
| |
|
0 commit comments
Comments
(0)