Skip site navigation (1) Skip section navigation (2)

Re: [PORTS] FPE on Alpha in Select with PKEY

From: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>
To: pgsql-ports(at)postgreSQL(dot)org
Subject: Re: [PORTS] FPE on Alpha in Select with PKEY
Date: 1999-03-01 16:54:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-ports
Further to the above: the error occurs on line 136 of the file

>   136    clausenode->selectivity = (Cost) floatVal(selecs);

floatVal is a macro 

#define floatVal(v)             (((Value *)v)->val.dval)

where value is

typedef struct Value
        NodeTag         type;                   /* tag appropriately
(eg. T_String) */
        union ValUnion
                char       *str;                /* string */
                long            ival;
                double          dval;
        }                       val;
} Value;

The variable selecs is of type list, i.e.

typedef struct List
        NodeTag         type;
                void       *ptr_value;
                int                     int_value;
        }                       elem;
        struct List *next;
} List;

The variable selecs is filled in in the routine best_or_subclause_index
in orindxpath.c, where the value that is read via the floatVal macro is
assigned from a float (called selec as well). So this seems wrong

Unfortunately casting ptr_value to float gives garbage as well:

(ladebug) p *(double*)selecs->elem.ptr_value     
(ladebug) p *(float*)selecs->elem.ptr_value     

Any ideas?


In response to


pgsql-ports by date

Next:From: Unprivileged userDate: 1999-03-02 03:43:18
Subject: Port Bug Report: not exist
Previous:From: Adriaan JoubertDate: 1999-03-01 16:51:57
Subject: Re: [PORTS] FPE on Alpha in Select with PKEY

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group