Bochs/bochs/cpu
Stanislav Shwartsman 6252632e31 Fixed segmentation fault that could happen under rare conditions with handlers chaining speedups enabled.
I saw that issue under gcc 4.9.0. for some reason gcc 4.9.0 didn't optimize next handler call in all fpu opcode handlers.
As result, instead of finishing the handler and jumping to next one, the next handler is called blowing up stack.
After some long period stack overflow might occur.

The fix simply limit the max chaining depth to 1000 traces (should be enough)
The same fix should be able to address the stack overflow problem when compiling with -O0 and handlers chaining speedup enabled.
2014-10-15 18:00:04 +00:00
..
avx implemented VPMULTISHIFTQB VBMI instruction 2014-09-26 13:19:45 +00:00
cpudb move common code (extended topology leaf) into base cpuid class to save code duplication 2014-10-15 14:25:08 +00:00
fpu fixed shoft128right macro is softfloat 2014-09-19 16:01:46 +00:00
3dnow.cc use shorter opcode names in the debug prints (skip the BX_IA_ prefix) 2013-12-02 20:06:59 +00:00
access32.cc fixed large code duplication in write_new_stack methods 2014-10-12 18:59:10 +00:00
access64.cc fixed large code duplication in write_new_stack methods 2014-10-12 18:59:10 +00:00
access.cc bugfix in canonical violation detection 2014-07-20 18:19:02 +00:00
aes.cc Implemented VCMPPS/PD/SS/SD AVX512 instructions 2013-12-03 15:44:23 +00:00
apic.cc adjust (c) in several files 2014-08-31 20:05:25 +00:00
apic.h preparations for apic regs virtualization feature described in SDM rev044 2012-09-06 15:21:08 +00:00
arith8.cc CMPXHG should always write to memory dest - affects APIC virtualization VMEXIT conditions 2013-07-24 21:06:24 +00:00
arith16.cc Infrstructure change to support disasm of BxInstruction_c directly (without calling disasm) 2013-09-24 05:21:00 +00:00
arith32.cc Infrstructure change to support disasm of BxInstruction_c directly (without calling disasm) 2013-09-24 05:21:00 +00:00
arith64.cc VMX: CMPXHG instructions should always write to the memory destination, even if the value unchanged - it affects VMEXIT conditions for the full apic virtualization 2013-08-04 19:37:04 +00:00
bcd.cc reword all the CPU code in preparation for future CPU speedup implementation. 2011-07-06 20:01:18 +00:00
bit16.cc Fix some more code duplication with sclaar_arith.h 2014-03-02 16:40:13 +00:00
bit32.cc Fix some more code duplication with sclaar_arith.h 2014-03-02 16:40:13 +00:00
bit64.cc Fix some more code duplication with sclaar_arith.h 2014-03-02 16:40:13 +00:00
bit.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
bmi32.cc added missing includes 2014-03-02 19:18:05 +00:00
bmi64.cc added missing includes 2014-03-02 19:18:05 +00:00
call_far.cc fixed large code duplication in write_new_stack methods 2014-10-12 18:59:10 +00:00
cpu.cc Fixed segmentation fault that could happen under rare conditions with handlers chaining speedups enabled. 2014-10-15 18:00:04 +00:00
cpu.h added more perfmon MSR defines into cpu.h 2014-10-15 15:21:38 +00:00
cpuid.cc move common code (extended topology leaf) into base cpuid class to save code duplication 2014-10-15 14:25:08 +00:00
cpuid.h move common code (extended topology leaf) into base cpuid class to save code duplication 2014-10-15 14:25:08 +00:00
cpustats.h Added statistics collection infrastructure in Bochs and 2014-10-14 15:59:10 +00:00
crc32.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
crregs.cc adjust (c) in several files 2014-08-31 20:05:25 +00:00
crregs.h cpuid fixes 2014-03-15 20:19:30 +00:00
ctrl_xfer16.cc use shorter opcode names in the debug prints (skip the BX_IA_ prefix) 2013-12-02 20:06:59 +00:00
ctrl_xfer32.cc use shorter opcode names in the debug prints (skip the BX_IA_ prefix) 2013-12-02 20:06:59 +00:00
ctrl_xfer64.cc use shorter opcode names in the debug prints (skip the BX_IA_ prefix) 2013-12-02 20:06:59 +00:00
ctrl_xfer_pro.cc - Do not compile support for alignment check (#AC exception) by default 2012-03-25 19:07:17 +00:00
data_xfer8.cc Infrstructure change to support disasm of BxInstruction_c directly (without calling disasm) 2013-09-24 05:21:00 +00:00
data_xfer16.cc removed duplication in XCHG instruction handlers 2014-10-12 19:31:14 +00:00
data_xfer32.cc removed duplication in XCHG instruction handlers 2014-10-12 19:31:14 +00:00
data_xfer64.cc removed duplication in XCHG instruction handlers 2014-10-12 19:31:14 +00:00
debugstuff.cc fixed compilation error with vs2008 2013-10-25 05:36:10 +00:00
descriptor.h fixed 64-bit segment print from internal debugger 2012-06-14 18:56:47 +00:00
disasm.cc fixed compilation warnings and errors with MSVCPP 2014-07-09 16:08:16 +00:00
event.cc update (c) for few files 2013-09-05 18:40:14 +00:00
exception.cc fixed large code duplication in write_new_stack methods 2014-10-12 18:59:10 +00:00
fetchdecode64.cc Rewritten handling of supported CPUID features to be able to handle large amount of CPU extensions 2014-08-31 18:39:18 +00:00
fetchdecode_avx.h Implemented VDBPSADBW AVX512BW instruction 2014-08-05 20:18:42 +00:00
fetchdecode_evex.h Update CPUID defines after recently published 2014-09-26 12:14:53 +00:00
fetchdecode_sse.h finish sse tables cleanup in disasm and fetchdecode 2013-10-11 20:09:51 +00:00
fetchdecode_x87.h disasm fixes 2013-10-07 19:02:53 +00:00
fetchdecode_xop.h Debugger: fixed param tree access to 64-bit variables (need to use get64() instead of get()) 2013-12-05 19:17:16 +00:00
fetchdecode.cc Rewritten handling of supported CPUID features to be able to handle large amount of CPU extensions 2014-08-31 18:39:18 +00:00
fetchdecode.h Implement AVX512BW and AVX512DQ extensions published in recently published Intel Archtecture Extensions manual rev20. 2014-07-18 11:14:25 +00:00
flag_ctrl_pro.cc bugfix for VMX_VM_EXEC_CTRL1_EXTERNAL_INTERRUPT_VMEXIT control handling 2014-07-08 19:15:54 +00:00
flag_ctrl.cc Move INTR, Local APIC INTR and SVN VINTR into new event interface (hardest part) 2012-10-03 20:24:29 +00:00
fpu_emu.cc reword all the CPU code in preparation for future CPU speedup implementation. 2011-07-06 20:01:18 +00:00
generic_cpuid.cc move common code (extended topology leaf) into base cpuid class to save code duplication 2014-10-15 14:25:08 +00:00
generic_cpuid.h rework in CPUID code (fixed code duplication). Re-enable perfmon reporting in CPUID because Win8/Win10 installation doesn't want to start without perfmon reported. TODO: implement basic perfmon support (at least only fixed counters) because win7-64 doesn't install with perfmon reported but not implemented 2014-10-15 08:04:38 +00:00
i387.h Adding Id and Rev property to all files 2011-02-24 21:54:04 +00:00
ia_opcodes.h removed duplication in XCHG instruction handlers 2014-10-12 19:31:14 +00:00
icache.cc Added statistics collection infrastructure in Bochs and 2014-10-14 15:59:10 +00:00
icache.h Thanks to avanced trace linking 256K entries ICache is not needed anymore. 2013-06-29 10:25:56 +00:00
init.cc Added statistics collection infrastructure in Bochs and 2014-10-14 15:59:10 +00:00
instr.h added configure option for trace linking optimization and mention it in CHANGES 2014-05-01 18:30:23 +00:00
io.cc fixed compilation warnings and errors with MSVCPP 2014-07-09 16:08:16 +00:00
iret.cc stack direct access optimization - 5% emu speedup to all 32-bit guests, for 64-bit guests speedup is less because they have less stack accesses 2012-03-25 11:54:32 +00:00
jmp_far.cc - Implemented Task Switch intercept in SVM, cleanup in task switch handling code 2012-01-11 20:21:29 +00:00
lazy_flags.h small optimization in lazy flags code 2012-09-06 19:49:14 +00:00
load.cc support fault suppression for recently added avx512bw ops 2014-07-25 21:45:09 +00:00
logical8.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
logical16.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
logical32.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
logical64.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
Makefile.in rework in CPUID code (fixed code duplication). Re-enable perfmon reporting in CPUID because Win8/Win10 installation doesn't want to start without perfmon reported. TODO: implement basic perfmon support (at least only fixed counters) because win7-64 doesn't install with perfmon reported but not implemented 2014-10-15 08:04:38 +00:00
mmx.cc Implemented VPSRLVW/VPSRAVW/VPSLLVW AVX512BW instructions 2014-07-25 21:15:48 +00:00
msr.cc adjust (c) in several files 2014-08-31 20:05:25 +00:00
mult8.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
mult16.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
mult32.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
mult64.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
paging.cc Added statistics collection infrastructure in Bochs and 2014-10-14 15:59:10 +00:00
proc_ctrl.cc added comment to RDPMC instr 2014-10-15 15:28:13 +00:00
protect_ctrl.cc avoid using access_write_linear when not strickly needed 2014-07-19 20:01:44 +00:00
rdrand.cc Add RDRAND/RDSEED instructions support (+ disasm) 2012-10-09 15:16:48 +00:00
resolver.cc Adding Id and Rev property to all files 2011-02-24 21:54:04 +00:00
ret_far.cc stack direct access optimization - 5% emu speedup to all 32-bit guests, for 64-bit guests speedup is less because they have less stack accesses 2012-03-25 11:54:32 +00:00
scalar_arith.h fixed code duplication in BEXTR implementations 2014-03-02 19:16:13 +00:00
segment_ctrl_pro.cc avoid using access_write_linear when not strickly needed 2014-07-19 20:01:44 +00:00
segment_ctrl.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
sha.cc properly added sha.cc to the tree 2013-07-24 18:56:37 +00:00
shift8.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
shift16.cc fixed comments for SHLD/SHRD instructrions and make code a little more clear 2012-09-09 17:44:42 +00:00
shift32.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
shift64.cc Standartization of Bochs instruction handlers. 2012-08-05 13:52:40 +00:00
simd_compare.h Implement AVX512BW and AVX512DQ extensions published in recently published Intel Archtecture Extensions manual rev20. 2014-07-18 11:14:25 +00:00
simd_int.h Implemented VDBPSADBW AVX512BW instruction 2014-08-05 20:18:42 +00:00
simd_pfp.h Added shape of implementation for last missing VSCALEF* AVX-512 instructons. 2014-03-09 21:42:11 +00:00
smm.cc implementation of virtual NMI 2013-03-05 21:12:43 +00:00
smm.h Fixed SF bug [3548109] VMX State Not Restored After Entering SMM on 32-bit Systems 2012-07-27 08:13:39 +00:00
soft_int.cc use shorter opcode names in the debug prints (skip the BX_IA_ prefix) 2013-12-02 20:06:59 +00:00
sse_move.cc adjust (c) in several files 2014-08-31 20:05:25 +00:00
sse_pfp.cc remove redundant type conversions 2014-03-23 20:01:58 +00:00
sse_rcp.cc Added shape of implementation for last missing VSCALEF* AVX-512 instructons. 2014-03-09 21:42:11 +00:00
sse_string.cc Implement AVX512BW and AVX512DQ extensions published in recently published Intel Archtecture Extensions manual rev20. 2014-07-18 11:14:25 +00:00
sse.cc make use of new accessor 2013-12-01 22:21:55 +00:00
stack16.cc small optimization 2014-02-01 19:23:41 +00:00
stack32.cc Infrstructure change to support disasm of BxInstruction_c directly (without calling disasm) 2013-09-24 05:21:00 +00:00
stack64.cc Infrstructure change to support disasm of BxInstruction_c directly (without calling disasm) 2013-09-24 05:21:00 +00:00
stack.cc Added statistics collection infrastructure in Bochs and 2014-10-14 15:59:10 +00:00
stack.h stack direct access optimization - 5% emu speedup to all 32-bit guests, for 64-bit guests speedup is less because they have less stack accesses 2012-03-25 11:54:32 +00:00
string.cc Implement AVX512BW and AVX512DQ extensions published in recently published Intel Archtecture Extensions manual rev20. 2014-07-18 11:14:25 +00:00
svm.cc adjust (c) in several files 2014-08-31 20:05:25 +00:00
svm.h updates in CPUID defines after new published AMD SDM 2013-05-17 19:41:57 +00:00
tasking.cc fixed massive code duplication 2014-07-03 06:40:42 +00:00
todo CPUDB: added AMD Trinity to the database 2014-03-15 18:30:13 +00:00
vapic.cc fixed compilation issue 2012-11-05 06:41:10 +00:00
vm8086.cc - Do not compile support for alignment check (#AC exception) by default 2012-03-25 19:07:17 +00:00
vmcs.cc adjust (c) in several files 2014-08-31 20:05:25 +00:00
vmexit.cc use shorter opcode names in the debug prints (skip the BX_IA_ prefix) 2013-12-02 20:06:59 +00:00
vmfunc.cc implemented virtualization exception feature 2013-01-28 16:30:25 +00:00
vmx.cc adjust (c) in several files 2014-08-31 20:05:25 +00:00
vmx.h cleanup after cpu features interface rework 2014-08-31 19:22:41 +00:00
xmm.h add proper alignment of XMM/YMM/ZMM registers within CPU class 2014-06-25 19:12:14 +00:00
xsave.cc remove redundant type conversions 2014-03-23 20:01:58 +00:00