Re: [PATCH] Fix memory corruption in pg_shdepend.c
От | Aleksander Alekseev |
---|---|
Тема | Re: [PATCH] Fix memory corruption in pg_shdepend.c |
Дата | |
Msg-id | CAJ7c6TN5AwbGXXm0qS4yBfzJnaY6_OHPCJ_ZCy-C6yP2T_7j=Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Fix memory corruption in pg_shdepend.c (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [PATCH] Fix memory corruption in pg_shdepend.c
|
Список | pgsql-hackers |
Hi Tom, > BTW, I think there is an additional bug in copyTemplateDependencies: > I do not see it initializing slot->tts_isnull[] anywhere. It > probably accidentally works (at least in devel builds) because we zero > that memory somewhere else, but surely this code shouldn't assume that? tts_isnull[] is zeroed in: - copyTemplateDependencies -- MakeSingleTupleTableSlot, which simply wraps: --- MakeTupleTableSlot ... where the slot is allocated with palloc0. The assumption that MakeSingleTupleTableSlot() returns valid TupleTableSlot* with zeroed tts_isnull[] seems reasonable, no? What confuses me is the fact that we have two procedures that do the same thing. Maybe one is redundant. -- Best regards, Aleksander Alekseev
В списке pgsql-hackers по дате отправления: