From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize |
Date: | 2023-03-23 03:25:25 |
Message-ID: | CAH2-Wzmgj8Mqu6YV705jBexQ_j27vamfJ_yDbwzUpgtMgkzfUQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Mar 22, 2023 at 8:11 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> A relevant comment is in StoreIndexTuple():
>
> /*
> * Note: we must use the tupdesc supplied by the AM in index_deform_tuple,
> * not the slot's tupdesc, in case the latter has different datatypes
> * (this happens for btree name_ops in particular). They'd better have
> * the same number of columns though, as well as being datatype-compatible
> * which is something we can't so easily check.
> */
>
> I'm just not really certain if we can say name is
> "datatype-compatible" with cstring or not. It seems that namehash,
> namecmp, nameout etc are all coded so that they can accept cstrings as
> inputs. It's just not going to be safe for anything that wants to
> access all of the NAMEDATALEN bytes.
I doubt that there is a clear answer to that question.
Have you seen the comments about the cstring/name_ops hack mentioning
a SIGSEGV in btrescan()? Those were added around the time index-only
scans first went in.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2023-03-23 04:01:24 | Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize |
Previous Message | David Rowley | 2023-03-23 03:10:58 | Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize |