forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6e9ac0a
committed
Avoid formally-undefined use of memcpy() in hstoreUniquePairs().
hstoreUniquePairs() often called memcpy with equal source and destinationpointers. Although this is almost surely harmless in practice, it'sundefined according to the letter of the C standard. Some versions ofvalgrind will complain about it, and some versions of libc as well(cf. commitad520ec). Tweak the code to avoid doing that.Noted by Tomas Vondra. Back-patch to all supported versions becauseof the hazard of libc assertions.Discussion:https://postgr.es/m/bf84d940-90d4-de91-19dd-612e011007f4@fuzzy.cz1 parentd538f65 commit6e9ac0a
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
339 | 339 |
| |
340 | 340 |
| |
341 | 341 |
| |
342 |
| - | |
| 342 | + | |
| 343 | + | |
343 | 344 |
| |
344 | 345 |
| |
345 | 346 |
| |
|
0 commit comments
Comments
(0)