skydevgit / crisscross

Automatically exported from code.google.com/p/crisscross
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

red-black tree bug #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following code raises an access violation on erasing items.

What steps will reproduce the problem?
    RedBlackTree<int,int> *rbtree = new RedBlackTree<int,int>();

    int rvals[25] = {937, 615, 354, 214, 776, 752, 121, 55, 945, 961, 488, 
891, 841, 190, 398, 612, 348, 531, 714, 476, 697, 869, 67, 703, 313};
    for (int i = 0; i < 25; i++) {
      int a = rvals[i];
      rbtree->insert(a,a);
    }

    for(int i = 0; i < 25; i++){
      rbtree->erase(rvals[i]);
    }

What version of the product are you using? On what operating system?
I tested it on the last version (0.7.0) on Windows. 

Original issue reported on code.google.com by icestudent@gmail.com on 22 May 2008 at 11:04

GoogleCodeExporter commented 9 years ago
The fix is in SVN revision 750. It'll definitely be in the next release.

Thanks for your bug report. I appreciate any stress-testing people can provide.

Original comment by steven.n...@gmail.com on 22 May 2008 at 3:51