Skip site navigation (1) Skip section navigation (2)

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

From: "Tim Kordas" <tkordas(at)greenplum(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2291: int2vectorrecv() and oidvectorrecv() are wrong (SIGBUS)
Date: 2006-02-28 18:25:10
Message-ID: (view raw or whole thread)
Lists: pgsql-bugs
The following bug has been logged online:

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

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

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

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

/* 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


pgsql-bugs by date

Next:From: Bruce MomjianDate: 2006-02-28 19:05:02
Subject: Re: FATAL: semctl(1672698088, 12, SETVAL, 0) failed
Previous:From: Tom LaneDate: 2006-02-28 15:57:46
Subject: Re: BUG #2290: Incorrect sequence increment after backup/restore

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group