Is the value for   "ps"  odd from this code as seen in the gdb output?
The program core dump almost instantly.

gcc 2.95.1
SunOS ligetti.cc.ic.ac.uk 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-5_10
htdig-3.2.0b1-dev-011600


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));
        ps->set(str);

        //
        // Set time format to standard to avoid sending If-Modified-Since
        // http headers in native format which http servers can't
        // understand
        //
        setlocale(LC_TIME, "C");
    }
    dcGlobalVars.Add(name, ps);
}







(gdb) run -v
Starting program: /home/ppp/htdig-test/bin/htdig -v
ht://dig Start Time: Tue Jan 18 15:59:24 2000

Program received signal SIGFPE, Arithmetic exception.
0xff0b877c in .urem () from /usr/lib/libc.so.1
(gdb) up
#1  0xff1757e0 in Dictionary::Add (this=0xc306c, name=@0xffbee850,
obj=0xc4628) at Dictionary.cc:192
192         int                 index = hash % tableLength;
(gdb) print index
$1 = 0
(gdb) up
#2  0xff1740d8 in Configuration::Add (this=0xc3068, name=@0xffbee850,
value=@0xffbee810) at Configuration.cc:177
177         dcGlobalVars.Add(name, ps);
(gdb) print name
$2 = (String &) @0xffbee850: {<Object> = {_vptr. = 0xc3138}, Length = 22,
Allocated = 23, Data = 0xc4608 "add_anchors_to_excerpt"}
(gdb) print ps
$3 = 1088928942
(gdb) up
#3  0xff174d70 in Configuration::Defaults (this=0xc3068, array=0xc2048) at
Configuration.cc:357
357             Add(array[i].name, array[i].value);
(gdb) print i
$4 = 0
(gdb) print array[1].name
$5 = 0xff23de08 "allow_in_form"
(gdb) print array[1].value
$6 = 0xff23de18 ""
(gdb) up
#4  0x3bb48 in main (ac=2, av=0xffbefccc) at htdig.cc:122
122         config.Defaults(&defaults[0]);
(gdb) print &defaluts[0]
No symbol "defaluts" in current context.
(gdb) print &defaults[0]
$7 = (ConfigDefaults *) 0xc2048
(gdb) up
Initial frame selected; you cannot go up.

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] 
You will receive a message to confirm this. 

Reply via email to