From f173dfac920addf6ecbf773bc003746455021d9c Mon Sep 17 00:00:00 2001 From: Sergey Sayamov Date: Fri, 27 Feb 2026 19:50:44 +0300 Subject: [PATCH 1/3] Fix instruction names for PyEval.CAST_TYPE --- quark/evaluator/pyeval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quark/evaluator/pyeval.py b/quark/evaluator/pyeval.py index 94655f59..8bc7aa5d 100644 --- a/quark/evaluator/pyeval.py +++ b/quark/evaluator/pyeval.py @@ -102,7 +102,7 @@ def __init__(self, apkinfo): for second_type in ("int", "long", "float", "double"): if first_type == second_type: continue - self.eval[f"{first_type}-{second_type}"] = self.CAST_TYPE + self.eval[f"{first_type}-to-{second_type}"] = self.CAST_TYPE # binop_kind for prefix in ( @@ -638,7 +638,7 @@ def NEG_AND_NOT_KIND(self, instruction): @logger def CAST_TYPE(self, instruction): try: - part = instruction[0].split("-") + part = instruction[0].split("-to-") value_type = self.type_mapping[part[1]] if part[0] in ("double", "long"): From 9c815fe125a88024e636d142b1ffead58cfb9469 Mon Sep 17 00:00:00 2001 From: Sergey Sayamov Date: Wed, 11 Mar 2026 19:07:26 +0300 Subject: [PATCH 2/3] Fix cast-type operation names in tests.evaluator --- tests/evaluator/test_pyeval.py | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/tests/evaluator/test_pyeval.py b/tests/evaluator/test_pyeval.py index edfca455..f0ab4705 100644 --- a/tests/evaluator/test_pyeval.py +++ b/tests/evaluator/test_pyeval.py @@ -167,19 +167,19 @@ def neg_not_wide_kind(request): ALL_CAST_KIND = list( { - prefix + "-" + postfix + prefix + "-to-" + postfix for prefix, postfix in itertools.product( ("int", "long", "float", "double"), ("int", "long", "float", "double"), ) }.difference( { - "int-int", - "long-long", - "float-float", - "double-double", - "double-long", - "long-double", + "int-to-int", + "long-to-long", + "float-to-float", + "double-to-double", + "double-to-long", + "long-to-double", } ) ) @@ -956,9 +956,7 @@ def test_neg_and_not_wide_kind(self, pyeval, neg_not_wide_kind): # Tests for type-casting def test_type_casting_without_wide_type(self, pyeval, cast_kind): instruction = [cast_kind, "v1", "v5"] - - index = cast_kind.index("-") + 1 - postfix = cast_kind[index:] + prefix, postfix = cast_kind.split("-to-") pyeval.eval[instruction[0]](instruction) @@ -970,9 +968,7 @@ def test_type_casting_with_wide_type_to_simple_type( self, pyeval, cast_wide_to_simple_kind ): instruction = [cast_wide_to_simple_kind, "v1", "v5"] - - index = cast_wide_to_simple_kind.index("-") + 1 - postfix = cast_wide_to_simple_kind[index:] + prefix, postfix = cast_wide_to_simple_kind.split("-to-") pyeval.eval[instruction[0]](instruction) @@ -985,9 +981,7 @@ def test_type_casting_with_simple_type_to_wide_type( self, pyeval, cast_simple_to_wide_kind ): instruction = [cast_simple_to_wide_kind, "v1", "v5"] - - index = cast_simple_to_wide_kind.index("-") + 1 - postfix = cast_simple_to_wide_kind[index:] + prefix, postfix = cast_simple_to_wide_kind.split("-to-") pyeval.eval[instruction[0]](instruction) From bff61aa6014f0ce2fc6ffec4698cd14d4bed4aac Mon Sep 17 00:00:00 2001 From: haeter525 Date: Sun, 22 Mar 2026 08:22:58 +0000 Subject: [PATCH 3/3] ci: adjust Ahmyth smoke test result due to issue #889 --- .github/workflows/smoke_test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 38609308..f94b04be 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -99,9 +99,11 @@ jobs: - name: Check Ahmyth Result shell: bash - # This sample should have 39 behaviors with 100% confidence + # This sample should have 39 behaviors with 100% confidence. + # Rule 00015 is currently detected with 80% confidence because PyEval fails + # to track byte arrays (issue #889: https://github.com/ev-flow/quark-engine/issues/889). run: | - if [ "${{ env.Ahmyth_RESULT }}" == "39" ]; then + if [ "${{ env.Ahmyth_RESULT }}" == "38" ]; then exit 0 else exit 1