pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christof Petig <christof@petig-baender.de>
To: pgsql-patches@postgresql.org
To: pgsql-bugs@postgresql.org
Cc: Interfaces <pgsql-interfaces@postgresql.org>
Subject: libecpg (8.0 and CVS) hits a gcc bug on powerpc and amd64 (crash)
Date: Wed, 16 Mar 2005 15:12:56 +0100
Message-ID: <42383EE8.5070503@petig-baender.de> (raw)

NB: The crossposting is actually suggested on the mailing list description:
"If you've found a bug in PostgreSQL, please send it both to this list
and also to the pgsql-patches list."

Amd64 and powerpc share an ABI design which enables variable passing in
registers and which makes va_list a complex datatype. Due to gcc not
implementing a part of the C9x standard
(http://mail-index.netbsd.org/tech-toolchain/2003/11/11/0011.html)
taking a pointer to a va_list will fail on these platforms. The
corresponding bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8262) is
closed, so the gcc developers seem not to plan to change this.

So I propose the following hack (feel free to improve it!) to go into
mainline. Since only powerpc and amd64 are affected (and the old method
does not work at all here at all) the patch should not be controversial.

    Christof

PS: I don't know about other architectures. I can't believe that only
ppc and amd64 pass parameters in registers.
PPS: I could not test it on amd64, but all docs indicate the same behaviour.

Attachments:

  [application/x-gzip] ecpg_ppc.patch.gz (1.1K, ../42383EE8.5070503@petig-baender.de/2-ecpg_ppc.patch.gz)
  download

  [application/pgp-signature] signature.asc (255B, ../42383EE8.5070503@petig-baender.de/3-signature.asc)
  download

view thread (6+ messages)  latest in thread

Message-ID: <42383EE8.5070503@petig-baender.de>
Permalink:  ../42383EE8.5070503@petig-baender.de/
Also on:    postgresql.org/message-id/42383EE8.5070503@petig-baender.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: christof@petig-baender.de, pgsql-patches@postgresql.org, pgsql-bugs@postgresql.org
  Subject: Re: libecpg (8.0 and CVS) hits a gcc bug on powerpc and amd64 (crash)
  In-Reply-To: <42383EE8.5070503@petig-baender.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox