forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit84e4570
committed
Fix set of issues with memory-allocation system calls in frontend code
Like the backend, the frontend has wrappers on top of malloc() and suchwhose use is recommended. Particularly, it is possible to do memoryallocation without issuing an error. Some binaries missed the use ofthose wrappers, so let's fix the gap for consistency.This also fixes two latent bugs:- In pg_dump/pg_dumpall when parsing an ACL item, on an out-of-memoryerror for strdup(), the code considered the failure as a ACL parsingproblem instead of an actual OOM.- In pg_waldump, an OOM when building the target directory string wouldcause a crash.Author: Daniel GustafssonDiscussion:https://postgr.es/m/gY0y9xenfoBPc-Tufsr2Zg-MmkrJslm0Tw_CMg4p_j58-k_PXNC0klMdkKQkg61BkXC9_uWo-DcUzfxnHqpkpoR5jjVZrPHqKYikcHIiONhg=@yesql.se1 parent34ff542 commit84e4570
File tree
5 files changed
+14
-15
lines changed- src/bin
- pg_ctl
- pg_dump
- pg_test_fsync
- pg_waldump
- psql
5 files changed
+14
-15
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1979 | 1979 |
| |
1980 | 1980 |
| |
1981 | 1981 |
| |
1982 |
| - | |
| 1982 | + | |
| 1983 | + | |
1983 | 1984 |
| |
1984 | 1985 |
| |
1985 | 1986 |
| |
|
Lines changed: 5 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
481 | 481 |
| |
482 | 482 |
| |
483 | 483 |
| |
484 |
| - | |
485 |
| - | |
486 |
| - | |
| 484 | + | |
487 | 485 |
| |
488 | 486 |
| |
489 | 487 |
| |
490 | 488 |
| |
491 | 489 |
| |
492 |
| - | |
| 490 | + | |
493 | 491 |
| |
494 | 492 |
| |
495 | 493 |
| |
| |||
501 | 499 |
| |
502 | 500 |
| |
503 | 501 |
| |
504 |
| - | |
| 502 | + | |
505 | 503 |
| |
506 | 504 |
| |
507 | 505 |
| |
508 | 506 |
| |
509 | 507 |
| |
510 |
| - | |
| 508 | + | |
511 | 509 |
| |
512 | 510 |
| |
513 | 511 |
| |
| |||
617 | 615 |
| |
618 | 616 |
| |
619 | 617 |
| |
620 |
| - | |
| 618 | + | |
621 | 619 |
| |
622 | 620 |
| |
623 | 621 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
173 |
| - | |
| 173 | + | |
174 | 174 |
| |
175 | 175 |
| |
176 | 176 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
247 | 247 |
| |
248 | 248 |
| |
249 | 249 |
| |
250 |
| - | |
| 250 | + | |
251 | 251 |
| |
252 | 252 |
| |
253 | 253 |
| |
254 | 254 |
| |
255 | 255 |
| |
256 | 256 |
| |
257 | 257 |
| |
258 |
| - | |
| 258 | + | |
259 | 259 |
| |
260 | 260 |
| |
261 | 261 |
| |
| |||
266 | 266 |
| |
267 | 267 |
| |
268 | 268 |
| |
269 |
| - | |
| 269 | + | |
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
273 | 273 |
| |
274 | 274 |
| |
275 |
| - | |
| 275 | + | |
276 | 276 |
| |
277 | 277 |
| |
278 | 278 |
| |
| |||
283 | 283 |
| |
284 | 284 |
| |
285 | 285 |
| |
286 |
| - | |
| 286 | + | |
287 | 287 |
| |
288 | 288 |
| |
289 | 289 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
203 |
| - | |
| 203 | + | |
204 | 204 |
| |
205 | 205 |
| |
206 | 206 |
| |
|
0 commit comments
Comments
(0)