BUG #2291: int2vectorrecv() and oidvectorrecv() are wrong (SIGBUS)

Поиск
Список
Период
Сортировка
От Tim Kordas
Тема BUG #2291: int2vectorrecv() and oidvectorrecv() are wrong (SIGBUS)
Дата
Msg-id 20060228182510.99484F0B03@svr2.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #2291: int2vectorrecv() and oidvectorrecv() are wrong (SIGBUS)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      2291
Logged by:          Tim Kordas
Email address:      tkordas@greenplum.com
PostgreSQL version: 8.1.3
Operating system:   All
Description:        int2vectorrecv() and oidvectorrecv() are wrong (SIGBUS)
Details:

During Greenplum's ongoing effort to expand support for postgres datatypes
in Bizgres-MPP; we discovered some issues with int2vectorrecv() and
oidvectorrecv().

int2vectorrecv() and oidvectorrecv() both use DirectFunctionCall3 to call
array_recv().

DirectFunctionCall3() leaves fcinfo->flinfo NULL.

array_recv() uses fcinfo->flinfo.

Calling array_recv() without a valid fcinfo->flinfo results in SIGBUS.

It would be easy to modify array_recv(), but is probably better to fix the
code in int2vectorrecv()/oidvectorrecv() by replacing the call to
DirectFunctionCall3() with direct forwarded call (similar to
int2vectorsend()):

/* leave arg[0] alone, it is correct */
fcinfo->arg[1] = ObjectIdGetDatum(INT2OID);
fcinfo->arg[2] = Int32GetDatum(-1);
result = (int2vector *)array_recv(fcinfo);

the flinfo->f_extra field used will be that passed in by array_recv()'s
caller.

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

Предыдущее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: FATAL: semctl(1672698088, 12, SETVAL, 0) failed
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: FATAL: semctl(1672698088, 12, SETVAL, 0) failed