Re: [BUGS] Segfault in 9.0 inlining SRF

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: [BUGS] Segfault in 9.0 inlining SRF
Дата
Msg-id AANLkTi=oZDB1+Q_=gsy4jTmZEmO-4YxzWv6twNBbAGgJ@mail.gmail.com
обсуждение исходный текст
Ответ на 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:
> 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.

I note that the error goes away if I do any of the following with my test case:
a) define the SRF as having no arguments, orb) make the argument passed into the SRF a constant rather than a
call to a function, orc) make the argument function (year) itself take no arguments, ord) make the argument passed to
yeara constant rather than current_date, ore) define year as VOLATILE, orf) put the call to segfault_setof into a
subqueryin the FROM clause. 

So this only manifests under a pretty specific type of query tree; a
function call as the argument to another function call, which is an
argument to an inlinable SRF in FROM.

Cheers,
BJ


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: WIP: extensible enums
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WIP: extensible enums