| From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
|---|---|
| To: | shihao zhong <zhong950419(at)gmail(dot)com> |
| Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Weird usages of sentinel_ok() |
| Date: | 2026-10-16 05:03:57 |
| Message-ID: | CAApHDvo8Dn8s49pA+_9+RN1D0ao2vd+p5JKoNQWeGh9fx-8VFw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, 16 Oct 2026 at 16:00, shihao zhong <zhong950419(at)gmail(dot)com> wrote:
> The patch looks right to me. All three CHUNKHDRSZ macros are
> sizeof(MemoryChunk), so the checked byte is the same.
Thanks for checking.
> While looking at the other callers I noticed bump.c sets the sentinel
> and requested_size in BumpAllocLarge() and BumpAllocChunkFromBlock(),
> but nothing ever reads them. Bump has no pfree, so BumpCheck() is the
> only place that could check it, and it doesn't. Is that on purpose, or
> should BumpCheck() call sentinel_ok() like the others do?
It should be checked. It's quite a bad oversight. I've pushed a fix
back to v17 to resolve that.
David
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-10-16 05:11:36 | Re: [PG19] psql backslash commands fail with translated messages and a non UTF-8 client encoding |
| Previous Message | Ma Xueting | 2026-10-16 04:44:36 | Re: [PATCH] Report no unpinned buffers as insufficient resources |