Skip site navigation (1) Skip section navigation (2)

Re: Bug in SQL editor find and replace

From: Andres Freund <andres(at)anarazel(dot)de>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, David Blewett <david(at)dawninglight(dot)net>, pgadmin-support(at)postgresql(dot)org
Subject: Re: Bug in SQL editor find and replace
Date: 2009-06-24 09:45:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-support
On 06/24/2009 11:12 AM, Dave Page wrote:
> On Wed, Jun 24, 2009 at 10:07 AM, Andres Freund<andres(at)anarazel(dot)de>  wrote:
>> On 06/24/2009 10:35 AM, Dave Page wrote:
>>> On Tue, Jun 23, 2009 at 8:23 PM, Andres Freund<andres(at)anarazel(dot)de>    wrote:
>>>> I found the issue. The code compares '(unsigned int)(-1)' with
>>>> '(size_t)(-1)' which works on 32bit but not on 64bit.
>>> Thanks Andres - patch applied.
>> I havent read very much of the code, but at a very quick glance a short
>> policing for issues of this kind looks sensible - unfortunately I cant do
>> this in due time (I think I have spotted some more comparisons of this kind
>> - I am not sure how big the influence of those is though).
> Yeah, that certainly wouldn't hurt. If you spot anything in passing,
> please point it out.
I have only looked at the source code of ctlSQLBox - but there is a wild 
mixature of unsigned int (32bit, unsigned), int(32bit signed), 
long(64bit signed), size_t(64bit signed unsigned) datatypes which are 
assigned in most of the possible combinations.
If I have glanced correctly nothing triggers unless somebody gets the 
idea to edit a 1GB+ file... But then it probably would trigger on 32bit 
as well.

But in my experience if no special care is payed on such issues there 
are more bugs hiding...

> We're not going to get a full review done before release now anyway...
Yea, its sounds a bit too invasive to do such a cleanup before release 
(it very well could uncover hidden bugs beside causing new ones).


In response to


pgadmin-support by date

Next:From: Andres FreundDate: 2009-06-24 10:11:50
Subject: Re: Bug in SQL editor find and replace
Previous:From: Dave PageDate: 2009-06-24 09:12:47
Subject: Re: Bug in SQL editor find and replace

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group