Re: htdig: htsearch logging problem

Gilles Detillieux (
Thu, 21 Jan 1999 16:03:01 -0600 (CST)

Just a hunch, but do the core dumps happen only when testing htsearch
from the command line, or do they happen when running searches from
your browser too? If it's just from the command line, it may be that
your syslog is dying when it tries to access the NULLs returned by
getenv() for variables that are undefined (REMOTE_HOST & HTTP_REFERER).

When run by the http server, these variables should be defined, so I
can't imagine what else would be the problem, if htsearch dumps core
even then. If this is the case, you'll need to poke around in logSearch()
to see what's failing. Given that the problem is happening in strlen(),
called indirectly from syslog(), the most likely culprit is a NULL string
pointer, i.e. char * 0 (as opposed to an empty string), being passed as
an argument to syslog().

According to Doug:
> Now that things are running the way I want them, I started looking at
> some of the other features. When I enable the logging feature htsearch
> dumps core every time. Here is the relevant info:
> 57$ uname -a
> SunOS 5.6 Generic_105181-06 sun4m sparc sun4m
> htdig 3.1.0b4 compiled with gcc 2.8.1 and libstdc++ 2.8.1
> Here is the relevant info from the core file:
> #0 0xef624614 in strlen ()
> (gdb) where
> #0 0xef624614 in strlen ()
> #1 0xef65a4ec in _doprnt ()
> #2 0xef663990 in vsnprintf ()
> #3 0xef64fe84 in _vsyslog ()
> #4 0xef64faa8 in syslog ()
> #5 0x2e2b4 in Display::logSearch (this=0xefffea38, page=1,
> matches=0x94260)
> at
> #6 0x2b3f4 in Display::display (this=0xefffea38, pageNumber=1)
> at
> #7 0x2fe98 in main (ac=1001616, av=0xefffef30) at
> If anyone has any ideas I'm all ears. :) This isn't crucial because we
> can always use GET, but it would be nice to have more info available.
> Thanks,
> Doug

Gilles R. Detillieux              E-mail: <>
Spinal Cord Research Centre       WWW:
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in
the body of the message.

This archive was generated by hypermail 2.0b3 on Mon Jan 25 1999 - 08:15:24 PST