View Issue Details

IDProjectCategoryView StatusLast Update
0000816LDMud 3.3Runtimepublic2018-01-30 04:59
Reporterzesstra Assigned Tozesstra  
PriorityimmediateSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSMacOS XOS Version10.6.x
Target Version3.3.721Fixed in Version3.3.721 
Summary0000816: Crash during compact_mapping()
DescriptionLDMud crashed in svalue_cmp() during compact_mapping(), because the number of values in the hash part of the mapping was not correct.

The happened, because resize_mapping (used for copy_mapping(), copy(), m_reallocate()) skipped keys referencing destructed objects, but did not correct the number of keys in the hash part, resulting in a hash part having less keys than stated in .hash.used. With the 'right' number of destructed keys and non-destructed keys, this led to the crash.
(The bug was in the driver since 2007, so this situation seems to be rather rare in practice - however after 6 years MG crashed 2 times in 2 days because of this...)
Steps To Reproducemapping m;
void create()
{
    if (clonep()) return;
    mapping m2 = ([clone_object(__FILE__): 1, clone_object(__FILE__)
        :2, 1:2, 2:3, 3:4, 4:5, 5:6, 6:7, 7:8, 8:9, 9:10, 10:11,
      11:12, 12:13,13:14]);
    object* keys = m_indices(m2);
    filter(keys,#'objectp)->remove();
    m=m_reallocate(m2,1);
    efun::garbage_collection("/log/gc");
}
void remove() {destruct(this_object());}
TagsNo tags attached.

Relationships

related to 0000517 resolved Crash in remove_mapping() 

Activities

zesstra

2013-02-24 00:23

administrator   ~0002185

Fix committed in revision e76051d15a884d138443e90612de382654767acf to master-3.3 branch (see changeset 892 for details). Thank you for reporting!

zesstra

2013-02-24 00:23

administrator   ~0002186

Fix committed in revision ceffa04550b6cd7d0b30ef6401fe860e288173a9 to master branch (see changeset 893 for details). Thank you for reporting!

zesstra

2018-01-29 19:59

administrator   ~0002320

Fix committed in revision e76051d15a884d138443e90612de382654767acf to master-3.3 branch (see changeset 2198 for details). Thank you for reporting!

zesstra

2018-01-29 22:57

administrator   ~0002371

Fix committed in revision e76051d15a884d138443e90612de382654767acf to master-3.3 branch (see changeset 3542 for details). Thank you for reporting!

zesstra

2018-01-30 04:59

administrator   ~0002422

Fix committed in revision ceffa04550b6cd7d0b30ef6401fe860e288173a9 to master branch (see changeset 3915 for details). Thank you for reporting!

Issue History

Date Modified Username Field Change
2013-02-23 14:05 zesstra New Issue
2013-02-23 14:05 zesstra Status new => assigned
2013-02-23 14:05 zesstra Assigned To => zesstra
2013-02-23 23:03 zesstra Project LDMud => LDMud 3.3
2013-02-23 23:03 zesstra Target Version => 3.3.720
2013-02-23 23:03 zesstra Target Version 3.3.720 => 3.3.721
2013-02-24 00:23 zesstra Source_changeset_attached => ldmud.git master-3.3 e76051d1
2013-02-24 00:23 zesstra Note Added: 0002185
2013-02-24 00:23 zesstra Status assigned => resolved
2013-02-24 00:23 zesstra Resolution open => fixed
2013-02-24 00:23 zesstra Source_changeset_attached => ldmud.git master ceffa045
2013-02-24 00:23 zesstra Note Added: 0002186
2013-02-24 00:29 zesstra Fixed in Version => 3.3.721
2013-02-24 01:05 zesstra Relationship added related to 0000517
2018-01-29 19:59 zesstra Source_changeset_attached => ldmud.git master ceffa045
2018-01-29 19:59 zesstra Source_changeset_attached => ldmud.git master-3.3 e76051d1
2018-01-29 19:59 zesstra Note Added: 0002320
2018-01-29 22:57 zesstra Source_changeset_attached => ldmud.git master ceffa045
2018-01-29 22:57 zesstra Source_changeset_attached => ldmud.git master-3.3 e76051d1
2018-01-29 22:57 zesstra Note Added: 0002371
2018-01-30 04:59 zesstra Source_changeset_attached => ldmud.git master ceffa045
2018-01-30 04:59 zesstra Note Added: 0002422