According to Joe R. Jah:
> Your concerns were very well founded; I applied a bunch of patches from
> the patch site, including that patch, to htdig 3.1.3 and compiled the
> source on a BSDI 4.0 box without any problem, but as soon as I randig,
> htdig dumped core.  I removed that patch, leaving other patches in, and
> recompiled; everything worked fine. 

I find this a bit surprising, actually, given that the changes to the
String class are quite minimal and isolated.  The >> operator shouldn't
even be used unless you use the "-" argument to htdig and feed it an URL
list via stdin.  Did you do this?  I also find it odd that it's failing
at Need2Get(), which seems to be called correctly.  This method just
copies the char * string it's passed into a statically declared String
object (which does appear to work, or it would have crashed at that
point), but when it calls String::get() to get back a char * string for
Dictionary::Exists(), the string object address passed to get() is 0x1!
How does the address of a static String get clobbered?

Could you try applying the patch again, and manually removing the >>
operator from htString.h and String.cc, and the code that uses in in
htdig.cc, then testing that out.  I'd like to see which of the changes
is the culprit.  If it still fails, perhaps manually back out some of
the changes to Retriever.cc (and Server.cc).

> Here are gdb results:
> __________________________________________________________________________
> $ gdb htdig htdig.core
> GDB is free software and you are welcome to distribute copies of it
>  under certain conditions; type "show copying" to see the conditions.
> There is absolutely no warranty for GDB; type "show warranty" for details.
> GDB 4.16 (i386-unknown-bsdi4.0), Copyright 1996 Free Software Foundation,
> Inc...
> Core was generated by `htdig'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/lib/libg++.so...done.
> Reading symbols from /usr/lib/libstdc++.so...done.
> Reading symbols from /shlib/libgcc.so...done.
> Reading symbols from /shlib/libcurses.so...done.
> Reading symbols from /shlib/libtermcap.so...done.
> Reading symbols from /shlib/libm.so...done.
> Reading symbols from /shlib/libc.so...done.
> Reading symbols from /shlib/ld-bsdi.so...done.
> #0  String::get (this=0x1) at String.cc:215
> 215         if (!Allocated)
> (gdb) bt
> #0  String::get (this=0x1) at String.cc:215
> #1  0x8054b06 in Retriever::Need2Get (this=0x80477c8, u=0x841f180 
>"http://www.ccsf.cc.ca.us/Info/") at Retriever.cc:598
> #2  0x8055a7c in Retriever::got_href (this=0x80477c8, url=@0x8415980, 
>description=0x80c86d0 "") at Retriever.cc:1102
> #3  0x805226f in HTML::do_tag (this=0x858c900, retriever=@0x80477c8, tag=@0x858c968) 
>at HTML.cc:964
> #4  0x8050d0f in HTML::parse (this=0x858c900, retriever=@0x80477c8, 
>baseURL=@0x8128880) at HTML.cc:306
> #5  0x80549fc in Retriever::RetrievedDocument (this=0x80477c8, doc=@0x8128780, 
>ref=0x8149700) at Retriever.cc:557
> #6  0x805471a in Retriever::parse_url (this=0x80477c8, urlRef=@0x8375400) at 
>Retriever.cc:459
> #7  0x8054195 in Retriever::Start (this=0x80477c8) at Retriever.cc:289
> #8  0x8057b9b in main (ac=4, av=0x80479c0) at htdig.cc:264
> #9  0x804eee0 in __start ()
> (gdb) q
> $


-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You'll receive a message confirming the unsubscription.

Reply via email to