public inbox for [email protected]
help / color / mirror / Atom feedFrom: Zhang Mingli <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: Re: Fix condition in shm_toc and remove unused function shm_toc_freespace.
Date: Thu, 12 Jan 2023 14:50:13 +0800
Message-ID: <70ce9710-e9ed-4a25-a327-88de830b8cf6@Spark> (raw)
In-Reply-To: <1c7954e4-1705-4855-a99d-c77bf426c3e7@Spark>
References: <f937934f-5b6c-402c-a9ab-605bd07dcba9@Spark>
<1c7954e4-1705-4855-a99d-c77bf426c3e7@Spark>
Hi,
On Jan 12, 2023, 14:34 +0800, Zhang Mingli <[email protected]>, wrote:
> Hi, hackers
>
> Some conditions in shm_toc_insert and shm_toc_allocate are bogus, like:
> if (toc_bytes + nbytes > total_bytes || toc_bytes + nbytes < toc_bytes)
> Remove the condition `toc_bytes + nbytes < toc_bytes` and take a sizeof(shm_entry) into account in shm_toc_allocate though
> shm_toc_allocate does that too.
shm_toc_insert does that too, and we can report error earlier.
Regards,
Zhang Mingli
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Fix condition in shm_toc and remove unused function shm_toc_freespace.
In-Reply-To: <70ce9710-e9ed-4a25-a327-88de830b8cf6@Spark>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox