www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5842] New: hash table corruption

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5842

           Summary: hash table corruption
           Product: D
           Version: D1
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: moi vermi.fr



When emptying a hash table, rehash it and fill it, an error occure.

Code sample :
void main()
{
    string[ string ] test = null;

    test[ "test1" ] = "test1";
    test.remove("test1");

    test.rehash;

    test[ "test3" ] = "test3";
}

Result:
Error: Interger Divide by Zero

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 13 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5842


hsteoh quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/druntime/pull/576

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 17 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5842




Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/8df0da02f3e290e54b131452663dbf24d1ca88d1
Fix bug 5842.

The bug is caused by rehash producing an AA with a zero-size hashtable
when called on an empty but non-null AA.

https://github.com/D-Programming-Language/druntime/commit/8e5a7bd8d7dd99420d50d92bc7a85ef61b140275


Fix bug 5842.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 22 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5842


hsteoh quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



Verified fixed in git HEAD.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 22 2013