~ubuntu-branches/ubuntu/jaunty/clamav/jaunty-backports

« back to all changes in this revision

Viewing changes to libclamav/bytecode_priv.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-10-02 17:11:00 UTC
  • mfrom: (0.3.1 lucid-proposed)
  • Revision ID: james.westby@ubuntu.com-20101002171100-0erjjoucua6kw2pc
Tags: 0.96.3+dfsg-2ubuntu0.10.04.1~jaunty1
* Source backport for Jaunty
  - Change build-dep on libtdl-dev to libtdl7-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
struct cli_bc_callop {
40
40
    operand_t* ops;
41
41
    uint16_t* opsizes;
 
42
    funcid_t funcid;
42
43
    uint8_t numOps;
43
 
    funcid_t funcid;
44
44
};
45
45
 
46
46
struct branch {
59
59
struct cli_bc_inst {
60
60
    enum bc_opcode opcode;
61
61
    uint16_t type;
 
62
    operand_t dest;
62
63
    interp_op_t interp_op;/* opcode for interpreter */
63
 
    operand_t dest;
64
64
    union {
65
65
        operand_t unaryop;
66
66
        struct cli_bc_cast cast;
96
96
 
97
97
struct cli_bc_dbgnode_element {
98
98
    unsigned nodeid;
 
99
    unsigned len;
99
100
    char *string;
100
 
    unsigned len;
101
101
    uint64_t constant;
102
102
};
103
103
 
139
139
 
140
140
struct cli_bc_ctx {
141
141
    uint8_t timeout;/* must be first byte in struct! */
 
142
    uint16_t funcid;
 
143
    unsigned numParams;
142
144
    /* id and params of toplevel function called */
143
145
    const struct cli_bc *bc;
144
146
    const struct cli_bc_func *func;
147
149
    uint16_t *opsizes;
148
150
    char *values;
149
151
    operand_t *operands;
150
 
    uint16_t funcid;
151
 
    unsigned numParams;
152
152
    uint32_t file_size;
 
153
    int outfd;
153
154
    off_t off;
154
155
    fmap_t *fmap;
155
156
    fmap_t *save_map;
156
157
    const char *virname;
157
158
    struct cli_bc_hooks hooks;
 
159
    struct cli_exe_info exeinfo;
 
160
    uint32_t lsigcnt[64];
 
161
    uint32_t lsigoff[64];
 
162
    uint32_t pdf_nobjs;
 
163
    struct pdf_obj *pdf_objs;
 
164
    uint32_t* pdf_flags;
 
165
    uint32_t pdf_size;
 
166
    uint32_t pdf_startoff;
 
167
    unsigned pdf_phase;
 
168
    int32_t pdf_dumpedid;
158
169
    const struct cli_exe_section *sections;
159
 
    int outfd;
 
170
    uint32_t resaddr;
160
171
    char *tempfile;
161
172
    void *ctx;
162
173
    unsigned written;
163
174
    unsigned filewritten;
164
175
    unsigned found;
 
176
    unsigned ninflates;
165
177
    bc_dbg_callback_trace trace;
166
178
    bc_dbg_callback_trace_op trace_op;
167
179
    bc_dbg_callback_trace_val trace_val;
168
180
    bc_dbg_callback_trace_ptr trace_ptr;
169
 
    unsigned trace_level;
170
181
    const char *directory;
171
182
    const char *file;
172
183
    const char *scope;
 
184
    unsigned trace_level;
173
185
    uint32_t scopeid;
174
186
    unsigned line;
175
187
    unsigned col;
176
188
    mpool_t *mpool;
177
189
    struct bc_inflate* inflates;
178
 
    unsigned ninflates;
179
190
    struct bc_buffer *buffers;
180
191
    unsigned nbuffers;
 
192
    unsigned nhashsets;
 
193
    unsigned njsnorms;
 
194
    unsigned jsnormwritten;
181
195
    struct cli_hashset *hashsets;
182
 
    unsigned nhashsets;
183
196
    struct bc_jsnorm* jsnorms;
184
 
    unsigned njsnorms;
185
197
    char *jsnormdir;
186
 
    unsigned jsnormwritten;
187
198
    struct cli_map *maps;
188
199
    unsigned nmaps;
189
200
    unsigned containertype;
190
201
    unsigned extracted_file_input;
 
202
    const struct cli_environment *env;
 
203
    unsigned bytecode_disable_status;
191
204
};
192
205
struct cli_all_bc;
193
206
int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const struct cli_bc_func *func, const struct cli_bc_inst *inst);
199
212
int cli_vm_execute_jit(const struct cli_all_bc *bcs, struct cli_bc_ctx *ctx, const struct cli_bc_func *func);
200
213
int cli_bytecode_prepare_jit(struct cli_all_bc *bc);
201
214
int cli_bytecode_init_jit(struct cli_all_bc *bc, unsigned dconfmask);
202
 
int cli_bytecode_done_jit(struct cli_all_bc *bc);
 
215
int cli_bytecode_done_jit(struct cli_all_bc *bc, int partial);
203
216
 
204
217
#ifdef __cplusplus
205
218
}