Török Edvin
ecedf8a9f9
bytecode_vm: fix memset on bigendian arch (bb #2478 ).
...
Otherwise memset's count is always 0, and we are using uninitialized bytes,
causing bytecode to misbehave.
2011-01-20 16:10:30 +02:00
Török Edvin
9eb82c24c8
bytecode_vm: fix apicall8
...
memstr() curiously always had haystack == needle for bytecode.
To fix this it helps if I actually read arg3 from ops[2] instead of ops[0]!
2010-10-18 11:02:52 +03:00
Török Edvin
a15fc904ed
bytecode_vm: fix cli_bcapi_get_pe_section and cli_bcapi_disasm_x86.
...
They were not working on the interpreter, interpreter was seeing bounds errors
where there weren't any.
The 2nd parameter is a count, not a pointer size, the pointer's size
is a constant. Override the size for now.
2010-10-18 10:48:19 +03:00
Török Edvin
1c00d0ac74
bytecode_vm: record errors as bytecode events too
2010-10-18 10:48:19 +03:00
Török Edvin
2cad69f723
bytecode_vm: restore stack_id after function return
...
This allows pointers to local stack variables to work correctly after a call.
Previously stackid was not restored, which caused bytecode_vm to stop bytecodes,
claiming it overrun the stack, when in fact it didn't.
(stackid stores stack size).
2010-10-18 10:48:19 +03:00
Török Edvin
598d7edae0
Fix use of uninitialized value (bb #2140 ).
...
This bug may cause crashes in certain cases.
2010-07-23 22:32:46 +03:00
Török Edvin
2545f9767c
Rearrange some fields in structs to avoid holes.
2010-06-09 13:44:29 +03:00
Török Edvin
f85ae23af3
Fix bswap64 in bytecode interpreter.
2010-05-14 10:41:28 +03:00
Török Edvin
9d39dc93f3
Fix bytecode interpreter nullptr comparisons.
2010-05-13 23:16:08 +03:00
Török Edvin
7ebca3d717
Fix interpreter on new bytecode API tests.
2010-05-13 22:44:41 +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
349e6e118b
More interpreter fixes, pdf.cbc seems to be running now.
2010-03-30 00:04:38 +03:00
Török Edvin
b9697ed80c
Fix OP_BC_GEPZ/OP_BC_GEP1 in interpreter.
...
It helps if the interpreter actually increments the variable by a non-zero
amount.
2010-03-30 00:04:38 +03:00
Török Edvin
44e134312c
More fixes for pdf.cbc.
2010-03-30 00:04:38 +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
15fd260a83
Only show all the trace/debug messages in --enable-debug mode.
...
This speeds up build of bytecode_vm.c, and makes the binary smaller.
2010-03-28 23:49:25 +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
7f6b55a124
Downgrade some messages to debug.
2010-03-24 17:55:04 +02:00
Török Edvin
48fc8b9852
Leak testcase.
2010-03-24 14:14:33 +02:00
Török Edvin
145ca5cb73
Fix distcheck.
2010-03-24 12:49:23 +02:00
Török Edvin
5dfb4bf136
match_with_read appears to be working!
2010-03-24 11:29:56 +02:00
Török Edvin
50829fbf12
Fix read of pedata in interpreter.
2010-03-24 10:41:11 +02:00
Török Edvin
0dd40a5490
Fix OP_BC_COPY.
2010-03-24 10:16:41 +02:00
Török Edvin
1c7c61941c
Fix GEPZ.
2010-03-24 00:07:17 +02:00
Török Edvin
4993d6cf02
Making progress on match_with_read.
2010-03-23 23:46:58 +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
9aa1d72591
Fix distcheck errors.
2010-03-22 13:00:23 +02:00
Török Edvin
c6c464e590
Fix clambc.
2010-03-22 12:53:48 +02:00
Török Edvin
52d0d8bc7e
More fixes for global vars in the interpreter.
2010-03-22 11:18:28 +02:00
Török Edvin
9cbece5ccd
WiP fixing globals in interpreter.
2010-03-22 11:18:28 +02:00
Török Edvin
8596e2785a
Switch interpreter to debug mode by default.
...
This does more sanity checks.
2010-03-17 19:34:45 +02:00
Török Edvin
7a5e93a081
missing opcode.
2010-03-06 17:38:42 +02:00
Török Edvin
bc157ce357
prepare for reading globals from ctx
2010-03-06 16:00:54 +02:00
Török Edvin
18204a6726
READN -> READNfrom
2010-03-06 15:58:35 +02:00
Török Edvin
df5c921d3a
READ1,8,16,32,64->READN
2010-03-06 15:54:14 +02:00
Török Edvin
c074ececc7
Properly calculate numBytes for interpreter, and protect interpreter from null
...
derefs.
2010-02-22 14:12:55 +02:00
Török Edvin
847d7fc1b8
2009->2010
2010-02-02 14:03:32 +02: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
52dd3a6bda
Initial support for loading .cbc files from DB.
2009-09-21 20:10:33 +03:00
Török Edvin
2922746173
Fix make distcheck.
2009-09-07 19:29:50 +03:00
Török Edvin
1a486dca3b
Add hidden ctx param to APIcalls.
2009-09-04 12:09:17 +03:00
Török Edvin
4e2959f26a
Fix memory leak.
...
make check VG=1 passes now!
2009-08-31 22:57:43 +03:00
Török Edvin
7a14dc4ce9
bytecode: prepare for implementing gep.
2009-08-24 13:43:08 +03:00
Török Edvin
72617ba209
bytecode: Implement load/store.
2009-08-24 11:16:36 +03:00
Török Edvin
cf0cd429e9
Implement API calls from bytecode.
2009-08-20 16:33:58 +03:00
Török Edvin
800a79e091
fix make distcheck.
2009-08-18 10:03:36 +03:00
Török Edvin
11e86f8ccb
Add debug facilities to bytecode interpreter.
2009-08-18 10:02:56 +03:00
Török Edvin
6922903ad9
bytecode: fully switch to a stack based allocation, and operands with various bitwidths.
2009-08-17 15:13:29 +03:00
Török Edvin
82ca2ab420
Specialize operands depending on bitwidth.
2009-08-17 15:13:29 +03:00
Török Edvin
ac17fc6cdb
fix SIGBUS on Sparc.
...
Need to use the alignment of the largest possible type that we access, which is
uint64_t in this case.
void* can be 32-bits, and uint64_t still requires 64-bit alignment on Sparc,
when compiling for 32-bits (default).
2009-08-02 14:49:05 +03:00