Infinity bsearch crash on Windows

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Infinity bsearch crash on Windows
Date: 2011-05-10 22:02:26
Message-ID: 4DC9B5F2.7030804@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-05-10 22:05:43 Re: Backpatching of "Teach the regular expression functions to do case-insensitive matching"
Previous Message Simon Riggs 2011-05-10 21:57:20 Re: VARIANT / ANYTYPE datatype