Infinity bsearch crash on Windows - Mailing list pgsql-hackers

From Greg Smith
Subject Infinity bsearch crash on Windows
Date
Msg-id 4DC9B5F2.7030804@2ndQuadrant.com
Whole thread Raw
Responses Re: Infinity bsearch crash on Windows  (Peter Geoghegan <peter@2ndquadrant.com>)
Re: Infinity bsearch crash on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
A 9.1Beta1 test report from Richard Broersma (and confirmed on another 
system by Mark Watson) showed up pgsql-testers this week at 
http://archives.postgresql.org/pgsql-testers/2011-05/msg00000.php with 
the following test crashing his Windows server every time:

SELECT 'INFINITY'::TIMESTAMP;

That works fine for me on Linux.  Richard chased the error in the logs, 
which was a generic "you can't touch that memory" one, down to a full 
stack trace:  
http://archives.postgresql.org/pgsql-testers/2011-05/msg00009.php

It looks like it's losing its mind inside of 
src/backend/utils/adt/datetime.c , specifically at this line in datebsearch:
   3576     while (last >= base)   3577     {   3578         position = base + ((last - base) >> 1);   3579
result= key[0] - position->token[0];
 

Why crash there only on Windows?  Was the problem actually introduced 
above this part of the code?  These are all questions I have no answer for.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us




pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: VARIANT / ANYTYPE datatype
Next
From: Tom Lane
Date:
Subject: Re: Backpatching of "Teach the regular expression functions to do case-insensitive matching"