| From: | Sami Imseih <samimseih(at)gmail(dot)com> |
|---|---|
| To: | Tristan Partin <tristan(at)partin(dot)io> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Increase repalloc_array() usage in buffile.c |
| Date: | 2026-07-29 19:57:39 |
| Message-ID: | CAA5RZ0tMHETN_DD_NFvYVEq_oXp52c7z4keR_5BKd3aVjHYtBw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
> I was reading some buffile.c code, and I noticed some hand-rolled
> versions of repalloc_array() (minus the multiplication check). Since we
> already have one usage of repalloc_array() in buffile.c for
> BufFile::files, I figured it would probably be alright if we used it in
> the other two locations as well.
This seems like a good idea, especially with bfc5cea76d25
which hardens (re-)palloc_array against integer overflow.
I checked and could not find any other occurances in buffile.c that
should be included.
--
Sami Imseih
Amazon Web Services (AWS)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2026-07-29 20:10:59 | Re: [PATCH] Batched clock sweep to reduce cross-socket atomic contention |
| Previous Message | Matthias van de Meent | 2026-07-29 19:45:44 | Bug: Whole-row var in indexes corrupts indexes after DDL |