klee: added missing include file

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
asan: patch to make it work with S2E

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
slirp: fixed use-after-free of sockets

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
build: Drop stray echo command in llvm-configure target

Signed-off-by: Diego Biurrun <diego@biurrun.de>
build: Drop --enable-assertions from configure runs where it is not supported
build: Drop unnecessary header copies from stp-configure commands

Signed-off-by: Diego Biurrun <diego@biurrun.de>
build: Drop redundant cp commands in stp-make recipes

This is already taken care of by the stp-copy targets.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
build: Use CP variable in all cases

Signed-off-by: Diego Biurrun <diego@biurrun.de>
build: Replace shell invocation by $(wildcard) Make function

Signed-off-by: Diego Biurrun <diego@biurrun.de>
build: Run stp configure script with /bin/sh instead of bash.

There is nothing bash-specific in that script.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
qemu/configure: Allow passing extra CXXFLAGS
docs: small typo fixes
x86_64-s2e-softmmu.mak: create default s2e x86_64 config

Create the default-config file for x86_64-s2e-softmmu

Signed-off-by: Michael Contreras <michael@inetric.com>
target-i386:op_helper: Use _W macros for register writes

Update the register writes to use the _W macros when TARGET_X86_64 is defined.

Signed-off-by: Michael Contreras <michael@inetric.com>
target-i386:op_helper:tlb_fill: use addr with TARGET_PAGE_MASK

Instead of passing page_addr, pass addr & TARGET_PAGE_MASK to
cpu_x86_handle_mmu_fault(). When running in 64 bit mode, page_addr will have
the upper unused bits set to 0xf, which will cause problems. The reason for
passing the page address instead of the address is mentioned in the comments:

    In S2E we pass page address instead of addr to cpu_x86_handle_mmu_fault,
since the latter can be symbolic while the former is always concrete.  To
compensate, we reset fault address here.

Signed-off-by: Michael Contreras <michael@inetric.com>
vl: use TARGET_ARCH define for QEMU_FILE_TYPE_LIB

Use TARGET_ARCH define to load the correct bytecode lib for s2e-softmmu in
qemu_find_file

Note: Still a terrible hack.

Signed-off-by: Michael Contreras <michael@inetric.com>
S2EExecutionState:getSymbolicRegistersMask: x86_64 Support

Modify S2EExecutionState::getSymbolicRegistersMask to support 64 bit regisers
and the new CPUX86State structure layout. Use offsetof() to get the flag
offsets: this prevents mismatches between the expectations of the CPUX86State
structure.

Signed-off-by: Michael Contreras <michael@inetric.com>
CorePlugin: limit copy size to prevent overflow

Limit the amount of bytes that can be copied into value to prevent any possible
overflows in s2e_trace_memory_access_slow().

Signed-off-by: Michael Contreras <michael@inetric.com>
CorePlugin: Set EIP support for x86_64

Add support for setting the EIP using 64 bit registers in
s2e_tcg_instrument_code().

Signed-off-by: Michael Contreras <michael@inetric.com>
softmmu: make ADDR_MAX target dependent

Make the ADDR_MAX define a target_ulong dependent value.

Signed-off-by: Michael Contreras <michael@inetric.com>