View Issue Details

IDProjectCategoryView StatusLast Update
0000565LDMud 3.5Implementationpublic2018-01-30 03:59
Reporterzesstra Assigned Tozesstra  
PrioritylowSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Platformx86_64OSMacOS XOS Version10.5.x
Target Version3.5.0Fixed in Version3.5.0 
Summary0000565: Hash in store_prog_string() assumes 32 bit pointers
DescriptionThe hash calculation in store_prog_string() and delete_prog_string() assumes pointers which fit into 32 bits. On LP64 platforms the distribution of the hashes will be impaired once strings are stored above 4GB (which is always the case on MacOS X, because the process address space contains a zero-page from 0 to 4GB).
Although it only reduces effiency in compilation, the hash calculation should be changed.
TagsNo tags attached.

Relationships

child of 0000564 closedzesstra LDMud 3.6 Consolidate hash functions 
child of 0000556 new LDMud 3.3 Change code which assumes that p_int and mp_int are always a long. 

Activities

zesstra

2008-09-16 14:48

administrator   ~0000785

Last edited: 2012-06-07 15:57

The hash calculation in ptrtable.c as well:
    /* TODO: This code assumes that a pointer is 32 Bits long */
    hash = key ^ key >> 16;
    hash ^= hash >> 8;
    hash &= (PTABLE_SIZE-1);
    mask = 1 << (hash & (CHAR_BIT-1));
    /* TODO: this statement assumes CHAR_BIT == 8 */
    usage_p = ptable->hash_usage + (hash >> 2 & 0000001:0000001);

(The assumption that CHAR_BIT is always 8 is also done in bytecode.h, right now the driver does anyway not work on platforms where CHAR_BIT != 8.)

Edit: this issue was separated into 0000804

Issue History

Date Modified Username Field Change
2008-09-09 07:25 zesstra New Issue
2008-09-09 07:25 zesstra Status new => assigned
2008-09-09 07:25 zesstra Assigned To => zesstra
2008-09-09 07:25 zesstra Relationship added child of 0000564
2008-09-09 07:27 zesstra Relationship added child of 0000556
2008-09-16 14:48 zesstra Note Added: 0000785
2010-07-14 02:39 zesstra Target Version => 3.5.0
2012-06-06 22:17 zesstra Source_changeset_attached => ldmud.git master 4f443d2a
2012-06-06 22:23 zesstra Fixed in Version => 3.5.0
2012-06-07 15:56 zesstra Issue cloned: 0000804
2012-06-07 15:57 zesstra Note Edited: 0000785
2012-06-07 15:57 zesstra Status assigned => resolved
2012-06-07 15:57 zesstra Resolution open => fixed
2018-01-29 18:59 zesstra Source_changeset_attached => ldmud.git master 4f443d2a
2018-01-29 21:57 zesstra Source_changeset_attached => ldmud.git master 4f443d2a
2018-01-30 03:59 zesstra Source_changeset_attached => ldmud.git master 4f443d2a