~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 15:36:00 UTC
  • mfrom: (10.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20101002153600-2tx3vki1u55cdrjy
Tags: 0.96.3+dfsg-2ubuntu0.10.04.1
Microversion update to 0.96.3 for Lucid (LP: #653738)

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;
 
156
    fmap_t *save_map;
155
157
    const char *virname;
156
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;
157
169
    const struct cli_exe_section *sections;
158
 
    int outfd;
 
170
    uint32_t resaddr;
159
171
    char *tempfile;
160
172
    void *ctx;
161
173
    unsigned written;
162
174
    unsigned filewritten;
163
175
    unsigned found;
 
176
    unsigned ninflates;
164
177
    bc_dbg_callback_trace trace;
165
178
    bc_dbg_callback_trace_op trace_op;
166
179
    bc_dbg_callback_trace_val trace_val;
167
180
    bc_dbg_callback_trace_ptr trace_ptr;
168
 
    unsigned trace_level;
169
181
    const char *directory;
170
182
    const char *file;
171
183
    const char *scope;
 
184
    unsigned trace_level;
172
185
    uint32_t scopeid;
173
186
    unsigned line;
174
187
    unsigned col;
175
188
    mpool_t *mpool;
176
189
    struct bc_inflate* inflates;
177
 
    unsigned ninflates;
178
190
    struct bc_buffer *buffers;
179
191
    unsigned nbuffers;
 
192
    unsigned nhashsets;
 
193
    unsigned njsnorms;
 
194
    unsigned jsnormwritten;
180
195
    struct cli_hashset *hashsets;
181
 
    unsigned nhashsets;
182
196
    struct bc_jsnorm* jsnorms;
183
 
    unsigned njsnorms;
184
197
    char *jsnormdir;
185
 
    unsigned jsnormwritten;
 
198
    struct cli_map *maps;
 
199
    unsigned nmaps;
 
200
    unsigned containertype;
 
201
    unsigned extracted_file_input;
 
202
    const struct cli_environment *env;
 
203
    unsigned bytecode_disable_status;
186
204
};
187
205
struct cli_all_bc;
188
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);
194
212
int cli_vm_execute_jit(const struct cli_all_bc *bcs, struct cli_bc_ctx *ctx, const struct cli_bc_func *func);
195
213
int cli_bytecode_prepare_jit(struct cli_all_bc *bc);
196
214
int cli_bytecode_init_jit(struct cli_all_bc *bc, unsigned dconfmask);
197
 
int cli_bytecode_done_jit(struct cli_all_bc *bc);
 
215
int cli_bytecode_done_jit(struct cli_all_bc *bc, int partial);
198
216
 
199
217
#ifdef __cplusplus
200
218
}