Shawn Webb
b2e7c931d0
Use OpenSSL for hashing.
2014-02-08 00:31:12 -05:00
Steve Morgan
54402320c0
Add bytecode performance statistics
2012-12-05 15:48:52 -08:00
Steve Morgan
03b99d0311
fix compiler warning
2012-10-19 09:39:06 -07:00
Steve Morgan
6ad45a2931
add initial allscan/allmatch mode to libclamav, clamd, clamdscan, and clamscan with unit tests
2012-10-18 14:12:58 -07:00
Török Edvin
62ee12b2f8
unit tests for new fmap scan API
2011-06-14 22:35:03 +03:00
Török Edvin
5007986ffd
Fix build on Etch (bb #2399 ).
2011-01-20 10:03:55 +02:00
Török Edvin
73489b8b4c
s/glibc 2.2/glibc 2.3/ for pthread_barrier.
2010-11-23 16:38:15 +02:00
Török Edvin
314c415b02
Restrict usage of pthread_barrier even more.
...
Don't want to add a configure test for it now...
2010-11-23 13:31:47 +02:00
Török Edvin
e3a9786792
Only use pthread_barrier* on Linux.
...
Looks like Solaris and Mac OS X didn't hear of barriers :(
2010-11-04 23:01:22 +02:00
Török Edvin
71a5cb434e
Fix build error.
2010-11-04 22:13:35 +02:00
Török Edvin
a7cf187a0c
Make cl_load thread safe (bb #2333 ).
...
Parallel cl_load() crash (bb #2333 ).
Reason is twofold:
- cache.c had 2 'static' global variables, thus trying to initialize same cache
from multiple threads
- bytecode2llvm.cpp: something in LLVM 2.7 is crashing when loading in
parallel
Fix is to drop the 'static' on the variable (cache is per engine already).
This also fixes a potential memory leak in clamd!
The other part of the fix is to turn on the mutex around bytecode compilation
always. We don't call cl_load in parallel, so this doesn't affect clamd, but
some may need to call cl_load in parallel.
2010-11-04 21:53:03 +02:00
Török Edvin
47cee5042d
fix unit test for JIT test mode.
2010-10-18 11:08:14 +03:00
Török Edvin
540fc128a0
freshclam is using private symbol that changed proto (bb #2187 ).
...
Change name to prevent crash with 0.96.1 freshclam and 0.96.2 libclamav.
You'll get a missing symbol error.
2010-08-11 14:26:10 +03:00
Török Edvin
213dfdff06
run 1 unit-test at least in test mode (bb #2151 ).
...
Also allow running test mode if JIT is not available, still checking
for failed startup.cbc execution.
2010-08-02 19:00:12 +03:00
Török Edvin
d049a2f72b
Make bytecode tests use testmode if they want.
...
None uses it yet.
2010-07-29 14:07:00 +03:00
Török Edvin
927d054838
Add engine param to bytecode, and remove dconf from _init.
2010-07-29 13:48:18 +03:00
Török Edvin
1ab57a63c7
Add bytecode.cvd load test.
2010-05-14 17:19:26 +03:00
Török Edvin
3d2808c218
bytecode: update unit tests for improved arithmetic test.
2010-05-14 10:41:50 +03:00
Török Edvin
aadccfd1c8
Fix valgrind warnings.
2010-05-13 23:35:47 +03:00
Török Edvin
fc01c6476f
Fix interpreter.
2010-05-13 23:25:11 +03:00
Török Edvin
a969167b6c
Add new bytecode API unit tests.
2010-05-13 22:44:29 +03:00
Török Edvin
e4a0f2c94f
fix compiler warnings (bb #1872 , bb #1934 , bb #1935 )
2010-04-13 16:19:47 +03:00
Török Edvin
d772904022
Fix matchwithread.cbc
...
ImageBase is little-endian, need to use conversion
function to access it.
2010-04-02 13:13:17 +03:00
Török Edvin
e407d32d04
Increase timeout of testcase itself.
2010-03-30 11:10:58 +03:00
Török Edvin
ce288463e2
Increase bytecode timeout for non-timeout tests.
2010-03-30 00:04:38 +03:00
Török Edvin
fa82ce037a
Separate bytecode tests into jit and interpreter.
...
This makes it easier to see which one has a problem, and also reduces the
runtime of individual tests.
2010-03-29 12:09:07 +03:00
Török Edvin
1678ef9e43
Fix inflate.cbc for the interpreter.
2010-03-29 11:38:52 +03:00
Török Edvin
0d9b99f43e
Fix bswap.cbc in interpreter mode.
2010-03-28 23:49:25 +03:00
Török Edvin
041bc64aab
Increase timeout in unit test (bb #1899 ).
2010-03-26 16:50:30 +02:00
Török Edvin
e439954b51
Fix valgrind warnings.
2010-03-24 17:37:23 +02:00
Török Edvin
778df8c22f
Fix more leaks.
2010-03-24 17:08:20 +02:00
Török Edvin
6ea339aeab
Fix bswap.
2010-03-24 15:27:15 +02:00
Török Edvin
48fc8b9852
Leak testcase.
2010-03-24 14:14:33 +02:00
Török Edvin
b26d43809a
Add matchwithread.cbc to unit tests.
2010-03-24 12:46:34 +02:00
Török Edvin
74f5816c58
Interpreter fixes for accessing 'ctx'.
...
This allow all cbcs in unit_tests/input to pass.
Not yet working on bytecode.cvd though.
2010-03-23 21:47:57 +02:00
Török Edvin
bdd9aeaeeb
Use a watchdog thread. Also make timeout be ms instead of us.
2010-03-23 16:33:41 +02:00
Török Edvin
b63681a52b
Introduce BytecodeTimeout.
2010-03-22 17:16:07 +02:00
Török Edvin
c42033313a
disable this test for now.
2010-03-22 12:49:16 +02:00
Török Edvin
6eeadbfeda
dconf for bytecode.
2010-02-15 17:32:41 +02:00
Török Edvin
c0afc51729
Don't use C++ comments in C code.
2010-01-27 12:07:08 +02:00
Tomasz Kojm
de351ee1bc
libclamav: handle digitally signed .info files
2010-01-25 13:28:19 +01:00
Török Edvin
ed4a336e2c
More build fixes.
2009-12-11 21:44:22 +02:00
Török Edvin
41423d3836
Reenable unit tests.
2009-10-02 14:20:50 +03:00
Török Edvin
646395bb44
Fix distcheck.
2009-10-02 12:52:35 +03:00
Török Edvin
52dd3a6bda
Initial support for loading .cbc files from DB.
2009-09-21 20:10:33 +03:00
Török Edvin
e6d1fe78ea
Apicall0 suppport for JIT.
2009-09-02 18:53:29 +03:00
Török Edvin
616616060d
This test now passes with the JIT.
2009-09-02 15:37:35 +03:00
Török Edvin
2487a4a342
Various bytecode JIT fixes, teach clamconf about JIT, and make sure make check runs the JIT!
2009-08-28 20:07:25 +03:00
Török Edvin
6b67ec6ee7
Handle runtime errors with setjmp/longjmp, using a thread-local jmpbuf to make
...
it threadsafe.
2009-08-28 13:26:33 +03:00
Török Edvin
85a25497bd
really execute the JITed code.
2009-08-27 20:41:29 +03:00