From 1480f4b9c2a320d254ff826f5d1f02794ad10862 Mon Sep 17 00:00:00 2001 From: Eric Hennenfent Date: Tue, 22 Sep 2020 10:37:35 -0700 Subject: [PATCH 1/3] Fix test regressions (#1804) * band-aid parsing of CLI version * Blacken --- tests/ethereum/test_general.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/ethereum/test_general.py b/tests/ethereum/test_general.py index 4149a67f5..b02f5595a 100644 --- a/tests/ethereum/test_general.py +++ b/tests/ethereum/test_general.py @@ -91,6 +91,9 @@ def test_propverif(self): def test_propverif_external(self) -> None: cli_version = subprocess.check_output(("manticore-verifier", "--version")).decode("utf-8") + cli_version = cli_version.split( + "Manticore is only supported on Linux. Proceed at your own risk!\n" + )[-1] py_version = f"Manticore {pkg_resources.get_distribution('manticore').version}\n" self.assertEqual(cli_version, py_version) @@ -1896,10 +1899,10 @@ def test_selfdestruct_gas(self): # nonempty call target nonempty = m.create_account(address=0x1111111111111111111111111111111111111111, nonce=1) - asm_sd_empty = """ PUSH20 0xffffffffffffffffffffffffffffffffffffffff + asm_sd_empty = """ PUSH20 0xffffffffffffffffffffffffffffffffffffffff SELFDESTRUCT """ - asm_sd_nonempty = """ PUSH20 0x1111111111111111111111111111111111111111 + asm_sd_nonempty = """ PUSH20 0x1111111111111111111111111111111111111111 SELFDESTRUCT """ From ca504241065dc1b285fdd7b727d59abe9ffd336d Mon Sep 17 00:00:00 2001 From: "Rodothea Myrsini (Romy) Tsoupidi" Date: Tue, 22 Sep 2020 23:01:46 +0200 Subject: [PATCH 2/3] Change types.FunctionType= (#1803) Co-authored-by: Eric Hennenfent --- manticore/wasm/structure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manticore/wasm/structure.py b/manticore/wasm/structure.py index 129d0eebd..0488524b8 100644 --- a/manticore/wasm/structure.py +++ b/manticore/wasm/structure.py @@ -348,7 +348,7 @@ def load(cls, filename: str): :param filename: name of the WASM module :return: Module """ - type_map = {-16: types.FunctionType, -4: F64, -3: F32, -2: I64, -1: I32} + type_map = {-16: FunctionType, -4: F64, -3: F32, -2: I64, -1: I32} m: Module = cls() with open(filename, "rb") as wasm_file: From 2152023f390a7dc45cf16cd5cc283d0cfa93b8ee Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Tue, 6 Oct 2020 17:07:25 -0400 Subject: [PATCH 3/3] native/cpu/x86: Add support for CPUID EAX=80000000h (#1811) --- manticore/native/cpu/x86.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manticore/native/cpu/x86.py b/manticore/native/cpu/x86.py index e839d7268..a43dbbdd1 100644 --- a/manticore/native/cpu/x86.py +++ b/manticore/native/cpu/x86.py @@ -961,6 +961,10 @@ def CPUID(cpu): 0x0: (0x00000000, 0x00000000, 0x00000000, 0x00000000), 0x1: (0x00000000, 0x00000000, 0x00000000, 0x00000000), }, + # CPUID with EAX=80000000h returns the highest supported extended function + # query in EAX. We don't currently support any other than 80000000h itself, + # so just return it back. + 0x80000000: (0x80000000, 0x00000000, 0x00000000, 0x00000000), } if cpu.EAX not in conf: