[htdig3-dev] a few bug fixes


Subject: [htdig3-dev] a few bug fixes
From: bosc@ceic.com
Date: Mon Dec 13 1999 - 03:02:31 PST


Hi,

I just run purify through htdig, and found a couple of leaks and other
bugs.

conf_parser: mismatching deletes : fixed

WordDBCompress : had forgotten to free... big memory leaks : fixed

Retriever,StringList .... not fixed : reports follow:

For those of you ho don't have the *great* purify tool
I have added some of the reports:

Cheers,

Marcel.

=============================================

         MLK: 5712 bytes leaked in 357 blocks
         This memory was allocated from:
               malloc [rtlib.o]
               __bUiLtIn_nEw [new1.cc]
               __builtin_new [rtlib.o]
               Dictionary::Add(const String&,Object*) [Dictionary.cc:214]
                          return;
                      }
                  
               => e = new DictionaryEntry();
                      e->hash = hash;
                      e->key = strdup(name);
                      e->value = obj;
               Retriever::IsValidURL(char*) [Retriever.cc:715]
               Retriever::got_href(URL&,const char*,int) [Retriever.cc:1204]
               HTML::do_tag(Retriever&,String&) [HTML.cc:805]
               HTML::parse(Retriever&,URL&) [HTML.cc:315]
               Retriever::RetrievedDocument(Document&,char*,DocumentRef*) [Retriever.cc:649]
               Retriever::parse_url(URLRef&) [Retriever.cc:511]
               Retriever::Start() [Retriever.cc:336]
               main [htdig.cc:280]
               _start [crt1.o]
         Block of 16 bytes (357 times); last block at 0x2366e60

=============================================

         This memory was allocated from:
               malloc [rtlib.o]
               __bUiLtIn_nEw [new1.cc]
               __builtin_new [rtlib.o]
               StringList::Create(const char*,char*) [StringList.cc:50]
                          {
                            if (word.length())
                            {
               => List::Add(new String(word));
                              word = 0;
                            }
                          }
               Retriever::IsValidURL(char*) [StringList.h:43]
               Retriever::got_href(URL&,const char*,int) [Retriever.cc:1204]
               HTML::do_tag(Retriever&,String&) [HTML.cc:805]
               HTML::parse(Retriever&,URL&) [HTML.cc:315]
               Retriever::RetrievedDocument(Document&,char*,DocumentRef*) [Retriever.cc:649]
               Retriever::parse_url(URLRef&) [Retriever.cc:511]
               Retriever::Start() [Retriever.cc:336]
               main [htdig.cc:280]
               _start [crt1.o]

=============================================

         This memory was allocated from:
               malloc [rtlib.o]
               __bUiLtIn_nEw [new1.cc]
               __builtin_new [rtlib.o]
               StringList::Create(const char*,char*) [StringList.cc:63]
                      // Add the last word to the list
                      //
                      if (word.length())
               => List::Add(new String(word));
                      return Count();
                  }
                  
               Retriever::IsValidURL(char*) [StringList.h:43]
               Retriever::got_href(URL&,const char*,int) [Retriever.cc:1204]
               HTML::do_tag(Retriever&,String&) [HTML.cc:805]
               HTML::parse(Retriever&,URL&) [HTML.cc:315]
               Retriever::RetrievedDocument(Document&,char*,DocumentRef*) [Retriever.cc:649]
               Retriever::parse_url(URLRef&) [Retriever.cc:511]
               Retriever::Start() [Retriever.cc:336]
               main [htdig.cc:280]
               _start [crt1.o]

         This memory was allocated from:
               malloc [rtlib.o]
               strdup [libc.so.1]
               Dictionary::Add(const String&,Object*) [Dictionary.cc:216]
                  
                      e = new DictionaryEntry();
                      e->hash = hash;
               => e->key = strdup(name);
                      e->value = obj;
                      e->next = table[index];
                      table[index] = e;
               Retriever::IsValidURL(char*) [Retriever.cc:715]
               Retriever::got_href(URL&,const char*,int) [Retriever.cc:1204]
               HTML::do_tag(Retriever&,String&) [HTML.cc:805]
               HTML::parse(Retriever&,URL&) [HTML.cc:315]
               Retriever::RetrievedDocument(Document&,char*,DocumentRef*) [Retriever.cc:649]
               Retriever::parse_url(URLRef&) [Retriever.cc:511]
               Retriever::Start() [Retriever.cc:336]
               main [htdig.cc:280]
               _start [crt1.o]

=============================================

         This memory was allocated from:
               malloc [rtlib.o]
               __bUiLtIn_nEw [new1.cc]
               __builtin_new [rtlib.o]
               Configuration::Add(const String&,const String&) [Configuration.cc:167]
                  //
                  void Configuration::Add(const String& name, const String& value)
                  {
               => ParsedString *ps = new ParsedString(value);
                      if (mystrcasecmp(name, "locale") == 0)
                      {
                          String str(setlocale(LC_ALL, value));
               Configuration::Defaults(const ConfigDefaults*) [Configuration.cc:360]
               main [htdig.cc:120]
               _start [crt1.o]

    ----------------------

    Marcel Bosc

    ECILA
    100 av. du Gal Leclerc
    93500 Pantin - France
    Tel: 33 1 56 96 10 85

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
htdig3-dev-unsubscribe@htdig.org
You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Mon Dec 13 1999 - 03:16:20 PST