dbTalk Databases Forums  

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

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2291: int2vectorrecv() and oidvectorrecv() are wrong (SIGBUS) in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tim Kordas
 
Posts: n/a

Default [BUGS] BUG #2291: int2vectorrecv() and oidvectorrecv() are wrong (SIGBUS) - 02-28-2006 , 08:34 PM







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)
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.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2291: int2vectorrecv() and oidvectorrecv() are wrong (SIGBUS) - 03-02-2006 , 03:15 PM






"Tim Kordas" <tkordas (AT) greenplum (DOT) com> writes:
Quote:
During Greenplum's ongoing effort to expand support for postgres datatypes
in Bizgres-MPP; we discovered some issues with int2vectorrecv() and
oidvectorrecv().
Yeah, seems I broke them while changing these datatypes to be regular
arrays :-(. Fix committed in HEAD and 8.1 branches. Thanks for the
report.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.