Re: [BUGS] Segfault in 9.0 inlining SRF

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: [BUGS] Segfault in 9.0 inlining SRF
Дата
Msg-id AANLkTinVn+-KA3s+0M43anhR+z3KgUm+YC4uQHYCUZUq@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] Segfault in 9.0 inlining SRF  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUGS] Segfault in 9.0 inlining SRF  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 25 October 2010 07:36, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Brendan Jurd <direvus@gmail.com> writes:
>> I have encountered a reproducible segfault in Postgres ...
>
> Looks like the invalItems list has been clobbered:
>
> (gdb) p *root->glob->invalItems
> $6 = {type = 2139062143, length = 2139062143, head = 0x7f7f7f7f,
>  tail = 0x7f7f7f7f}
>
> I'm guessing it was modified in the temporary memory context and not
> properly copied out to the parent context when we finished inlining
> the function.
>

Hi Tom,

Thanks for the hint; I found that the attached patch resolved my
specific segfault, but I am wondering whether it goes far enough.  The
patch just copies invalItems up out of the temporary context before it
is deleted.  Could there also be changes to other elements of
PlannerGlobal that need to be saved?  Should we in fact be copying out
the whole of PlannerGlobal each time, and would that necessitate a new
copyfunc for it?

Cheers,
BJ

Вложения

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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Range Types, discrete and/or continuous
Следующее
От: Andrew Dunstan
Дата:
Сообщение: add label to enum syntax