Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize
Дата
Msg-id CAH2-Wzmgj8Mqu6YV705jBexQ_j27vamfJ_yDbwzUpgtMgkzfUQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-bugs
On Wed, Mar 22, 2023 at 8:11 PM David Rowley <dgrowleyml@gmail.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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize
Следующее
От: David Rowley
Дата:
Сообщение: Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize