libecpg (8.0 and CVS) hits a gcc bug on powerpc and amd64 (crash)

Поиск
Список
Период
Сортировка
Искать

libecpg (8.0 and CVS) hits a gcc bug on powerpc and amd64 (crash)

От:
Christof Petig <christof@petig-baender.de>
Дата:
Вложения:
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.

Re: [INTERFACES] libecpg (8.0 and CVS) hits a gcc bug on powerpc

От:
Christof Petig <christof@petig-baender.de>
Дата:
Christof Petig schrieb:
> 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.

I failed to mention that call by reference is the default for va_list on
these platforms (that's actually the cause of the bug).

    Christof

Re: [INTERFACES] libecpg (8.0 and CVS) hits a gcc bug on powerpc and amd64 (crash)

От:
Michael Meskes <meskes@postgresql.org>
Дата:
Patch committed. Thanks.

Michael

-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
FAQ