realbasic-nug
[Top] [All Lists]

Re: Two Scary Mac Bugs (just in time for Halloween)

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Two Scary Mac Bugs (just in time for Halloween)
From: Keith DeLong <lists@redcort.com>
Date: Fri, 31 Oct 2008 12:24:07 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <31A3CD45-2354-475E-B51E-8BF3509F8D76@great-white-software.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Thread-index: Ack7jj4ZfKRwKqeBEd2xnAAbY5tzNg==
Thread-topic: Two Scary Mac Bugs (just in time for Halloween)
User-agent: Microsoft-Entourage/11.4.0.080122
>> I reported a feedback like this in July.
>> 
>> *********
>> Dictionary lookup of 32-bit integer keys using a 64-bit integer
>> returns different result in PPC v. Intel.
>> 
>> Steps to Reproduce:
>>  dim X as Int32 = 43
>>  dim Y as Int64 = 43
>> 
>>  dim d as new Dictionary
>>  d.Value(X) = true
>>  dim b as Boolean = d.Lookup(Y, false)
>> 
>> b is true in Intel builds, but false in PPC builds.
>> *********
> 
> 
> Actually this is not a bug. The internal hash of the two values is
> different.
> Not unlike trying to use strings with different encodings fails for
> the same reason.
> So the hash of "Hello" in US ASCII is different than "Hello" in UTF16.
> Int32 hashes and int64 hashes are not the same even if they hold the
> same value

Norman,
If the hash is different and that is the basis of determining equality for a
variant then Intel Mac and Win32 are broken because they say Integer and
Int64 values are the same. (I'd argue this is the correct functionality).

However it's handled internally, the inconsistent results returned between
PPC and Intel builds is a REALbasic bug.

Keith DeLong



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>