[Pidgin] #5887: Pidgin does not work on 64-bit userland PowerPC systems

Pidgin trac at pidgin.im
Wed May 21 15:51:21 EDT 2008


#5887: Pidgin does not work on 64-bit userland PowerPC systems
-----------------------+----------------------------------------------------
 Reporter:  JoseJX     |       Type:  patch
   Status:  new        |   Priority:  minor
Component:  libpurple  |    Version:  2.4.2
 Keywords:  ppc64      |    Pending:  0    
-----------------------+----------------------------------------------------
 '''The problem:'''

 On 64-bit systems, time_t is a 64-bit value.  time_t is used as a hash key
 in savedstatuses.c, but the g_hash_table is implemented using a 32-bit
 hash key value.  Additionally, all of the preferences save these keys as
 32-bit values.  Unfortunately, the first word is used on 64-bit
 architectures. On little endian systems, these are the LSB and no problem
 is visible.  On big endian 64-bit systems, the values used for the hash
 key are the MSB and do not change, leading to collisions, etc.

 This manifests as looping for a *very* long time when adding new hash
 elements, as well as segfaults due to an inability to match keys.

 '''Proposed solution:'''

 Change the current usage of time_t in saved_statuses to unsigned int.
 This fixes the observed issue on ppc64.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/5887>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list