[fpc-pascal] Database problem on Solaris SPARC

Ludo Brands ludo.brands at free.fr
Thu Jul 12 16:58:16 CEST 2012


> > We only support 32 bit SPARC, and there we split a 64 bit load into 
> > two
> > 32 bit loads. dbl, assuming it points to a double, should 
> point to a 64 
> > bit-aligned memory location though (depending on the cpu, 32 bit 
> > alignment may be sufficient, but better be safe than sorry).
> 
> I'll try to test against 2.7.1 later in the day, although as 
> I've said 
> Linux is OK. Is the  if FIntegerDatetimes then  something 
> Solaris-specific Ludo?)?
> 
No, the value is read from the server and depends on how the server was
compiled. Run 'show integer_datetimes;' in psql or whatever client you are
using to see the value. 
Pqconnection has detected that it is 'on' on your server. You can check with
above command to see if the server agrees with that.
With integer_datetimes on the datetime is returned as an int64 with the
number of microseconds since 2000-01-01 00:00:00 UTC, hence the 
dbl^ := pint64(buffer)^/1000000;
Dbl is a Pdouble, so the alignment problem could indeed come from there. The
buffer returned by the driver is correct because just before you have
pint64(buffer)^ := BEtoN(pint64(CurrBuff)^); CurrBuff being the pointer
returned. 

Now, you are getting a SIGSEGV, not a SIGBUS which is what you would get for
an alignment problem. 

Ludo




More information about the fpc-pascal mailing list