bug -- duplicate entries in the custom.dic cause assert


Subject: bug -- duplicate entries in the custom.dic cause assert
From: Sam TH (sam@uchicago.edu)
Date: Sun Feb 04 2001 - 22:21:59 CST


Here's what I just entered as bug 1111.
      
I'm not entirely sure which is the bug here, but there are two
potential problems.

1) The root cause is that somehow, my custom.dic got a duplicate
entry. This shouldn't ever happen, since once you add something, it
should stay added, and you shouldn't get a chance to add it again. I
haven't the foggiest idea how this happened, but it wasn't normal. I
can't reproduce it.

2) Once you have a duplicate entry, Abi generates an assert every time
you start up. The question is, should we keep this assert? I would
think that it shouldn't be a UT_SHOULD_NOT_HAPPEN case to try to add
the same key to a hash table twice. What do other people think?

The code that asserts is in ut_alphahash.cpp:68. It looks like this:

else if (cmp == 0)
{
        // added duplicate key
        UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
        return -1;
}

     
        sam th
        sam@uchicago.edu
        http://www.abisource.com/~sam/
        GnuPG Key:
        http://www.abisource.com/~sam/key




This archive was generated by hypermail 2b25 : Sun Feb 04 2001 - 22:21:28 CST