This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin 1.5.6-1 and 20040126 : SIGSEGV in random() ???

On Wed, Jan 28, 2004 at 08:12:23AM +0100, Nicolas Lehuen wrote:
>I'm trying to run the latest snapshot of clamav ( )
>under Cygwin 1.5.6-1. I compiled and ran the virus DB update (freshclam)
>nicely. However each time I want to run the scanner (clamscan) I get a
>segmentation fault at random times ; sometimes it will perform a full scan,
>sometime it will stop after a few files, sometimes it won't even start. I
>ran clamscan under gdb and this is what I got :
>$ gdb clamscan
>GNU gdb 2003-09-20-cvs (cygwin-special)
>Copyright 2003 Free Software Foundation, Inc.
>GDB is free software, covered by the GNU General Public License, and you are
>welcome to change it and/or distribute copies of it under certain
>Type "show copying" to see the conditions.
>There is absolutely no warranty for GDB.  Type "show warranty" for details.
>This GDB was configured as "i686-pc-cygwin"...
>(gdb) run
>Starting program: /usr/local/bin/clamscan.exe
>Program received signal SIGSEGV, Segmentation fault.
>0x610ab285 in random () from /usr/bin/cygwin1.dll
>(gdb) where
>#0  0x610ab285 in random () from /usr/bin/cygwin1.dll
>#1  0x610ab057 in random () from /usr/bin/cygwin1.dll
>#2  0x61054e66 in localtime_r () from /usr/bin/cygwin1.dll
>#3  0x61086431 in cygwin1!aclcheck () from /usr/bin/cygwin1.dll
>#4  0x0041ae72 in cli_cvdload (fd=0x10032504, root=0x22ed0c,
>    at cvd.c:370
>#5  0x0040eb95 in cl_loaddb (
>    filename=0x100301f0 "/usr/local/share/clamav/daily.cvd", root=0x22ed0c,
>    virnum=0x41e1a0) at readdb.c:103
>#6  0x0040f0d2 in cl_loaddbdir (dirname=0x40ee95 "/usr/local/share/clamav",
>    root=0x22ed0c, virnum=0x41e1a0) at readdb.c:221
>#7  0x0040520a in scanmanager (opt=0x41e1a0) at manager.c:92
>#8  0x0022ed0c in ?? ()
>#9  0x0041e1a0 in bell ()
>I guess this explain the random occurence of the SIGSEGVs... Is there any
>way this could be due to a bad usage of random() by clamav ? Or is it a
>problem with this version of cygwin ? I've tried with the latest snapshot
>available (20040126) with the same result. Someone already built an older
>version of clamav under an older version of cygwin, I tried it and it worked
>: . However I'd like to run with
>the latest version...

We have a problem reporting page that should help you in reporting problems.
It is: .

I will be updating it today with information on why backtraces on
stripped DLLs are worthless.  If you take a look at the source, you'll
see that localtime does not actually call random and aclcheck does not
call localtime.

If you are willing to debug this using gdb, then you'll need to build
a debugging version of the DLL.
Please use the resources at rather than sending personal email.
Special for spam email harvesters: send email to
and be permanently blocked from mailing lists at

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]