Ticket #5887 (closed patch: fixed)
Pidgin does not work on 64-bit userland PowerPC systems
| Reported by: | JoseJX | Owned by: | |
|---|---|---|---|
| Milestone: | 2.5.5 | Component: | libpurple |
| Version: | 2.4.2 | Keywords: | ppc64 |
| Cc: |
Description
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.



