forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7f3b41c
committed
Clear padding of PgStat_HashKey when handling pgstats entries
PgStat_HashKey is currently initialized in a way that could result inrandom data if the structure has any padding bytes. The structurehas no padding bytes currently, fortunately, but it could become aproblem should the structure change at some point in the future.The code is changed to use some memset(0) so as any padding would behandled properly, as it would be surprising to see random failures inthe pgstats entry lookups. PgStat_HashKey is a structure internal topgstats, and an ABI change could be possible in the scope of a bug fix,so backpatch down to 15 where this has been introduced.Author: Bertrand DrouvotReviewed-by: Jelte Fennema-Nio, Michael PaquierDiscussion:https://postgr.es/m/Zyb7RW1y9dVfO0UH@ip-10-97-1-34.eu-west-3.compute.internalBackpatch-through: 151 parent811f8d3 commit7f3b41c
2 files changed
+19
-2
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
822 | 822 |
| |
823 | 823 |
| |
824 | 824 |
| |
| 825 | + | |
| 826 | + | |
| 827 | + | |
825 | 828 |
| |
826 | 829 |
| |
827 | 830 |
| |
|
Lines changed: 16 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
406 | 406 |
| |
407 | 407 |
| |
408 | 408 |
| |
409 |
| - | |
| 409 | + | |
410 | 410 |
| |
411 | 411 |
| |
412 | 412 |
| |
413 | 413 |
| |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
414 | 421 |
| |
415 | 422 |
| |
416 | 423 |
| |
| |||
881 | 888 |
| |
882 | 889 |
| |
883 | 890 |
| |
884 |
| - | |
| 891 | + | |
885 | 892 |
| |
886 | 893 |
| |
887 | 894 |
| |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
888 | 902 |
| |
889 | 903 |
| |
890 | 904 |
| |
|
0 commit comments
Comments
(0)