about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2016-09-07 09:01:01 +0200
committerGitHub <noreply@github.com>2016-09-07 09:01:01 +0200
commit292a5d639cdb64b0b2eb1d855cf93dc4d3c4d1d9 (patch)
treec82a3080f049c838006755da6fdab5aaca9feab5 /test
parent0ba30f79356130d46db669b4c933ba508e6a63a4 (diff)
parent180ef6b0ed3561e3d770b80d6cc79c4f77941cd6 (diff)
downloadmiasm-292a5d639cdb64b0b2eb1d855cf93dc4d3c4d1d9.tar.gz
miasm-292a5d639cdb64b0b2eb1d855cf93dc4d3c4d1d9.zip
Merge pull request #422 from serpilliere/fix_seh_tib
Fix seh tib
Diffstat (limited to '')
-rw-r--r--test/arch/x86/unit/mn_seh.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/arch/x86/unit/mn_seh.py b/test/arch/x86/unit/mn_seh.py
index cc8b5cc2..d6fc56ca 100644
--- a/test/arch/x86/unit/mn_seh.py
+++ b/test/arch/x86/unit/mn_seh.py
@@ -3,7 +3,7 @@ import sys
 
 from miasm2.os_dep.win_api_x86_32_seh import fake_seh_handler, build_teb, \
     set_win_fs_0, return_from_exception, EXCEPTION_PRIV_INSTRUCTION, \
-    return_from_seh, FS_0_AD, DEFAULT_SEH
+    return_from_seh, DEFAULT_SEH
 from miasm2.os_dep.win_32_structs import ContextException
 
 from asm_test import Asm_Test_32
@@ -23,8 +23,9 @@ class Test_SEH(Asm_Test_32):
 
     def init_machine(self):
         super(Test_SEH, self).init_machine()
-        build_teb(self.myjit, FS_0_AD)
         set_win_fs_0(self.myjit)
+        tib_ad = self.myjit.cpu.get_segm_base(self.myjit.cpu.FS)
+        build_teb(self.myjit, tib_ad)
         self.myjit.add_exception_handler((1 << 17),
                                          Test_SEH.deal_exception_priv)
         self.myjit.add_breakpoint(return_from_exception, return_from_seh)