From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Joseph Koshakow <koshy44(at)gmail(dot)com> |
Cc: | jian he <jian(dot)universality(at)gmail(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: Remove dependence on integer wrapping |
Date: | 2024-07-22 22:27:13 |
Message-ID: | Zp7cwd_6NXlHt6Ye@nathan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 22, 2024 at 04:36:33PM -0500, Nathan Bossart wrote:
> Okay. I'll plan on committing v13-0002 in the next couple of days, then.
Actually, I think my concerns about prohibiting more than necessary go away
if we do the subtraction first. If "upperIndx[i] - lowerIndx[i]"
overflows, we know the array size is too big. Similarly, if adding one to
that result overflows, we again know the the array size is too big. This
appears to be how the surrounding code handles this problem (e.g.,
ReadArrayDimensions()). Thoughts?
--
nathan
Attachment | Content-Type | Size |
---|---|---|
v14-0001-Remove-overflow-from-array_set_slice.patch | text/plain | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-07-22 22:29:35 | Re: [PATCH] GROUP BY ALL |
Previous Message | Masahiko Sawada | 2024-07-22 22:07:46 | Re: Add on_error and log_verbosity options to file_fdw |