Le 30 déc. 04, à 16:05, Tom Lane a écrit :
> Rémi Zara <remi_zara@mac.com> writes:
>>> Hmm. I was hoping to spot some obviously machine-dependent code
>>> nearby
>>> to the crash point, but I don't see anything wrong in that area.
>>>
>>> You might try rebuilding tsearch with -O0 (if it wasn't already) in
>>> hopes that the backtrace becomes more accurate.
>
>> The tsearch test passes when compiled with -O0 (postgres is still
>> compiled with -O2)
>
> Ugh. That suggests it could be a compiler bug. Are you using the
> latest available compiler version for your platform?
Hi,
The problem is that when compiled with -O2, the pushval_morph func
address is 0x0 (in query.c).
It goes away with the following patch, which might not be a proper
solution....
Regards,
Rémi Zara
Index: query.c
===================================================================
RCS file: /projects/cvsroot/pgsql/contrib/tsearch/query.c,v
retrieving revision 1.16
diff -u -r1.16 query.c
--- query.c 9 Nov 2004 06:09:33 -0000 1.16
+++ query.c 30 Dec 2004 19:10:46 -0000
@@ -616,6 +616,7 @@ char pbuf[16384], *cur;
#endif
+ elog(DEBUG5, "pushval_morph address is %p", pushval_morph); initmorph(); query = queryin((char *)
PG_GETARG_POINTER(0),pushval_morph); res = clean_fakeval(GETQUERY(query), &len);
--
Rémi Zara
http://www.remi-zara.net/