postgresql bug report (fwd) - Mailing list pgsql-hackers
From | The Hermit Hacker |
---|---|
Subject | postgresql bug report (fwd) |
Date | |
Msg-id | Pine.BSF.4.05.9905141649150.47191-100000@thelab.hub.org Whole thread Raw |
Responses |
6.5 cvs: problem with includes in src/interfaces/libpq++/
Re: [HACKERS] postgresql bug report (fwd) Re: [HACKERS] postgresql bug report (fwd) Re: [HACKERS] postgresql bug report (fwd) Re: [HACKERS] postgresql bug report (fwd) |
List | pgsql-hackers |
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org ---------- Forwarded message ---------- Date: Fri, 14 May 1999 14:50:58 -0400 From: Jack Howarth <howarth@nitro.med.uc.edu> To: scrappy@hub.org Subject: postgresql bug report Marc, In porting the RedHat 6.0 srpm set for a linuxppc release we believe a bug has been identified in the postgresql source for 6.5-0.beta1. Our development tools are as follows... glibc 2.1.1 pre 2 linux 2.2.6 egcs 1.1.2 the latest binutils snapshot The bug that we see is that when egcs compiles postgresql at -O1 or higher (-O0 is fine), postgresql creates incorrectly formed databases such that when the user does a destroydb the database can not be destroyed. Franz Sirl has identified the problem as follows... it seems that this problem is a type casting/promotion bug in the source. The routine _bt_checkkeys() in backend/access/nbtree/nbtutils.c calls int2eq() in backend/utils/adt/int.c via a function pointer *fmgr_faddr(&key[0].sk_func). As the type information for int2eq is lost via the function pointer, the compiler passes 2 ints, but int2eq expects 2 (preformatted in a 32bit reg) int16's. This particular bug goes away, if I for example change int2eq to: bool int2eq(int32 arg1, int32 arg2) { return (int16)arg1 == (int16)arg2; } This moves away the type casting/promotion "work" from caller to the callee and is probably the right thing to do for functions used via function pointers. ...because of the large number of changes required to do this, Franz thought we should pass this on to the postgresql maintainers for correction. Please feel free to contact Franz Sirl (Franz.Sirl-kernel@lauterbach.com) if you have any questions on this bug report. -- ------------------------------------------------------------------------------ Jack W. Howarth, Ph.D. 231 Bethesda Avenue NMR Facility Director Cincinnati, Ohio 45267-0524 Dept. of Molecular Genetics phone: (513) 558-4420 Univ. of Cincinnati College of Medicine fax: (513) 558-8474
pgsql-hackers by date: