Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 65C8C1337C02 for ; Tue, 10 May 2011 18:42:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 12848-05 for ; Tue, 10 May 2011 21:42:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mail.postgresql.org (Postfix) with ESMTP id 63F0E1337BD2 for ; Tue, 10 May 2011 18:42:03 -0300 (ADT) Received: from [192.168.1.6] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LzFY5-1Pfv7Q0ThJ-014Pt6; Tue, 10 May 2011 23:42:01 +0200 Message-ID: <4DC9B123.7010309@2ndQuadrant.com> Date: Tue, 10 May 2011 17:41:55 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110307 Icedove/3.0.11 MIME-Version: 1.0 To: Richard Broersma CC: pgsql-testers@postgresql.org Subject: Re: 9.1Beta1 - Repeatable Crash on Windows References: <4DC85DF3.9030105@agliodbs.com> <4DC86132.20604@agliodbs.com> <4DC87067.4050101@2ndQuadrant.com> <4DC88CFF.9020301@2ndquadrant.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:LEGUOGMgGrwOi9MQieYGYgaQB3jUW72Dx3QF9pFOeSs KCsE9kcz02dZmbyHG2wVNnPhnPLnr3RMwXZ31W5CSRpgOWhAMW voUyRWjjEq44xw9kd7MWkyDXLJn8+BeMPw6vnODtpvx3Qh/EjQ HE0Pd+uijNkXlfvnCf1Wl0rQPguwiWow/B33NT1Lf47taaQzdK G1jTiSs14J+WPx6EyPyipbmfl5d6vBcY1R5UNfsu2c= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201105/11 X-Sequence-Number: 230 On 05/10/2011 01:07 PM, Richard Broersma wrote: > 0:003> G > (4ac.158): Access violation - code c0000005 (first chance) > First chance exceptions are reported before any exception handling. > This exception may be expected and handled. > eax=ffffffff ebx=fffffff4 ecx=ffffffff edx=fffffffd esi=00000000 edi=00000000 > eip=0063b890 esp=00d4f614 ebp=00d4f7c0 iopl=0 nv up ei ng nz na pe cy > cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010287 > postgres!datebsearch+0x30: > 0063b890 0fbe0c97 movsx ecx,byte ptr [edi+edx*4] ds:0023:fffffff4=?? > 0:000> ~*k > > . 0 Id: 4ac.158 Suspend: 1 Teb: 7ffdf000 Unfrozen > ChildEBP RetAddr > 00d4f620 0063d738 postgres!datebsearch+0x30 > [c:\pginstaller-repo\postgres.windows\src\backend\utils\adt\datetime.c > @ 3579] > That's interesting...it's going crazy here: 3565 /* datebsearch() 3566 * Binary search -- from Knuth (6.2.1) Algorithm B. Special case like this 3567 * is WAY faster than the generic bsearch(). 3568 */ 3569 static const datetkn * 3570 datebsearch(const char *key, const datetkn *base, int nel) 3571 { 3572 const datetkn *last = base + nel - 1, 3573 *position; 3574 int result; 3575 3576 while (last >= base) 3577 { 3578 position = base + ((last - base) >> 1); 3579 result = key[0] - position->token[0]; So something about that is getting really confused when searching back to negative infinity, but seemingly only on Windows. Thanks for the great detective work help, I'll bounce this over to pgsql-hackers where more people will see it. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD