[fpc-pascal] Database problem on Solaris SPARC

Sven Barth pascaldragon at googlemail.com
Tue Jul 17 12:19:00 CEST 2012


Am 17.07.2012 11:12, schrieb Mark Morgan Lloyd:
> Ludo Brands wrote:
>>>> 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.
>
> This problem no longer exists in 2.7.1 (21919 + Reinier's
> solarisdbtrunk2.diff).

Then it might be good if you report this in Mantis together with 
Reinier's patch so that it isn't forgotten.

Regards,
Sven




More information about the fpc-pascal mailing list