Commit graph

509 commits

Author SHA1 Message Date
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
11cee1b7de Disable JITDebugRegisterer, and fix unit_tests rule. 2010-03-24 17:22:34 +02:00
Török Edvin
778df8c22f Fix more leaks. 2010-03-24 17:08:20 +02:00
Török Edvin
95fc03dac7 Fix unit test script.
test_run always exits with 1 on success, so check its return code.
2010-03-24 16:46:21 +02:00
Török Edvin
3504bd0e29 Run check_clamav under valgrind too to actually detect the leaks.
One leak remaining for IntConstants.
2010-03-24 16:25:57 +02:00
Török Edvin
45a45bed33 Port LLVM leakfixes from trunk:
commit 63a535b8c10001cc189647804f311f413d0d9f29
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Sun Mar 21 20:37:19 2010 +0000

    Memoize InlineAsms into the LLVMContext and delete them on shutdown.
    Fixes PR803.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99143 91177308-0d34-0410-b5e6-96231b3b80d8

commit 700524ca0d62f3c952aaa6834c6a9792076e2dd6
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Sat Mar 13 01:26:15 2010 +0000

    Delete MDNodes when LLVMContext is destroyed.  Previous attempts: r97918, r97788.

    Tested: clang debug bootstrap, llvm-gcc bootstrap, `make check-lit`
    after configuring with --with-llvmgccdir (and this did run the
    FrontendC* tests this time)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98410 91177308-0d34-0410-b5e6-96231b3b80d8

commit 8460da1b03c5138a9d5d4185e005e9da6de2bd47
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Sun Mar 21 21:17:34 2010 +0000

    Move the LLVMContextImpl implementation into a .cpp file.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99146 91177308-0d34-0410-b5e6-96231b3b80d8
commit 0b20bf7e5e79ec124f03ef11eb88be14b1b69162
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Sun Mar 21 22:08:41 2010 +0000

    Re-add the Metadata.h include to LLVMContextImpl.h so that MDNode is complete
    where FoldingSet<MDNode> is instantiated.  Clang and MSVC complain; gcc
    doesn't.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99147 91177308-0d34-0410-b5e6-96231b3b80d8

commit 77e427769a0c1dce88e3cc147aa00b2c0dd7f8dd
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Mon Mar 22 05:23:37 2010 +0000

    Free all Constants in ~LLVMConstantImpl.  We avoid assertion failures
    by dropping all references from all constants that can use other
    constants before trying to destroy any of them.

    I also had to free bugpoint's Module in ~BugDriver().

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99160 91177308-0d34-0410-b5e6-96231b3b80d8

commit 6dd22e9c0e8ba4e34a4a21574d66c03c004831bb
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Sat Mar 13 20:09:55 2010 +0000

    Allow types that have been forwarded to to be freed.

    Tested: make check-lit && valgrind --dsymutil=yes --leak-check=full unittests/ExecutionEngine/JIT/Debug/JITTests

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98447 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 16:25:32 +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
353dafc9c4 Update unit tests. 2010-03-22 11:18:28 +02:00
Török Edvin
b56bea54d3 New API for buffer fill. 2010-03-22 11:18:28 +02:00
Török Edvin
8ef83e0bfc Fix unit test: ctx.fmap can't be NULL. 2010-02-22 17:59:32 +02:00
Török Edvin
5b74e89a35 enable prefiltering, and add to dconf.
Also downgrade some warnings to debug messages.
2010-02-15 17:32:41 +02:00
Török Edvin
6eeadbfeda dconf for bytecode. 2010-02-15 17:32:41 +02:00
Török Edvin
1e30496d2a runtime checks verifier. 2010-02-15 17:32:41 +02:00
Török Edvin
0eb864b461 update unit tests. 2010-02-15 17:32:41 +02:00
Török Edvin
236fb13647 New pointer handling rules. 2010-02-15 17:32:40 +02:00
Török Edvin
40103a3004 Merge branch 'tmp' into prefiltering2
* tmp:
  Prepare for prefiltering: add new files.

Conflicts:
	libclamav/Makefile.am
	libclamav/Makefile.in
	libclamav/libclamav.map
	libclamav/regex_list.c
2010-02-09 12:28:23 +02:00
Török Edvin
e0ac80ab38 Prepare for prefiltering: add new files.
Move SO_search to filtering.c as filtering_search.
Add unit test.
2010-02-09 12:12:49 +02:00
Török Edvin
ada793857b Update unit tests after Phishing.Heuristics -> Heuristics.Phishing change. 2010-02-08 20:27:59 +02:00
Török Edvin
c0afc51729 Don't use C++ comments in C code. 2010-01-27 12:07:08 +02:00
Török Edvin
57cb0075d9 regenerate build files.
using automake 1.11.1
2010-01-26 10:10:56 +02:00
Tomasz Kojm
de351ee1bc libclamav: handle digitally signed .info files 2010-01-25 13:28:19 +01:00
Török Edvin
2d45ef0616 Support for malloc in bytecode. Fix crash with mismatched api/flevel versions. 2010-01-20 20:04:01 +02:00
Török Edvin
acba3cf51b Prevent check from hanging/crashing when there is a version mismatch.
Show an error on version mismatch, 0.9.8 library with header
from 0.9.6 causes hangs/crashes.
2010-01-20 18:12:10 +02:00
Török Edvin
9463f9fd90 Stack protector support. 2009-12-18 14:17:50 +02:00
Török Edvin
688799d126 yc_bytecode is able to unpack a file now! 2009-12-17 17:40:35 +02:00
Török Edvin
ed4a336e2c More build fixes. 2009-12-11 21:44:22 +02:00
Török Edvin
5b5e4e6ef0 Merge branch 'bytecode'
* bytecode: (99 commits)
  Update to autoconf 2.65, and libtool 2.2.6b.
  Disable LLVM's make check for now.
  Output trace messages to stderr, to ensure its flushed.
  Support for bytecode lines >8k.
  Print llvm's version too when printing clambc's.
  Fix global initializer bitcasts.
  Allow controlling trace level from cmdline.
  Refactor trace API, so that trace printing happens in clambc.
  Add support for null constant.
  Trace formatting fixes.
  Add support for tracing (if bytecode compiled with support).
  Drop extra {} and "".
  Fix compiler version check for C++: autoconf needs [] to be escaped.
  change bytecode format to allow structs with more than 16 fields.
  Fix after merge: update to fmap API.
  Support for scanning files created by bytecode.
  read optional debug metadata.
  Sync headers with clamav bytecode compiler.
  Print better error message when wrong function is called.
  Update to new LLVM API.
  ...

Conflicts:
	Makefile.am
	Makefile.in
	configure
	configure.in
	libclamav/Makefile.am
	libclamav/Makefile.in
	libclamav/pe.h
2009-12-11 18:21:04 +02:00
Török Edvin
482e97dbb2 Support for bytecode lines >8k.
Size is specified on first line (which must be <8k).
2009-12-11 16:05:38 +02:00
Török Edvin
284ffd21f2 Add support for null constant. 2009-12-09 15:15:35 +02:00
Török Edvin
65c740d7d8 Add support for tracing (if bytecode compiled with support).
TODO: global id 0 is now a null pointer, need to adjust rest of conversion code
accordingly.
2009-12-08 23:02:49 +02:00
aCaB
7ab261a02b properly check for lm 2009-12-07 19:52:36 +01:00
Török Edvin
aee2f72436 Fix compiler version check for C++: autoconf needs [] to be escaped.
Also sync unit tests with compiler.
2009-12-07 19:10:51 +02:00
Török Edvin
46e2863c4c Merge branch 'master' into bytecode
* master: (182 commits)
  libclamav/qsort.c: fix CMP1 macro (bb#1769)
  handle floating chars
  libclamav/readdb.c: make sure static sigs with floating chars go into AC
  sigtool: --decode-sigs: handle alternatives
  sigtool: --decode-sigs: handle .ldb sigs
  inflateinit spam
  sigtool: --decode-sigs: handle .ndb sigs
  fix sig printing
  Set limit to 255 so that warning is shown if maxthreads*maxrec would exceed it.
  Enable more than 256 FD support on Solaris (bb #1764).
  fix memleaks
  sigtool: --decode-sigs; decode .db entries (bb#1246)
  fsk sxs, gimme back my dll hell!
  Fix Solaris build: cli_hex2ui has to be added to libclamav.map
  Don't error on unused functions.
  sigtool: basic sig decoding
  sigtool/sigtool.c: handle .ign2 files (bb#1625)
  libclamav/qsort.c: don't call med3 when using internal cmp
  win32: fix globbing
  unify DUPMAX def
  ...

Conflicts:
	.gitignore
	Makefile.am
	configure
	libclamav/Makefile.in
	libclamav/clamav.h
	libclamav/disasm.c
	libclamav/libclamav.map
	libclamav/matcher.c
	libclamav/others.c
	libclamav/pe.c
	libclamav/pe.h
	libclamav/readdb.c
2009-12-03 11:25:24 +02:00
Török Edvin
3ae0a76d03 Support for scanning files created by bytecode. 2009-12-02 17:30:17 +02:00
Török Edvin
322a0ea653 Fix bytecode load bugs. Make loading more robust: print error message instead of
crashing.
Able to load and dry-run yc_bytecode.o1.cbc now.
2009-11-26 17:29:59 +02:00
Török Edvin
b8656613c0 Doxygenize API headers. 2009-11-26 17:29:58 +02:00
Török Edvin
16604dcfec Fix ppc buildbot build. 2009-11-13 21:49:14 +02:00
Török Edvin
04a32cd312 Solaris's /bin/sh doesn't support export FOO=... 2009-11-13 21:35:12 +02:00
Török Edvin
3e95bd7268 Run clamscan with --debug to help diagnose failures. 2009-11-11 09:51:12 +02:00
Török Edvin
250d92c533 Sync with compiler. 2009-11-06 16:34:46 +02:00
Török Edvin
ec3c072e84 Remove virusevent test logfile, to prevent false failures. 2009-10-29 18:53:09 +02:00
Török Edvin
b3c69e9236 More verbose error message in unit test. 2009-10-26 19:35:27 +02:00
Török Edvin
7d5e0e1e5a Make error message more verbose. 2009-10-26 19:10:26 +02:00