Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ltfish
Copy link
Member

@ltfish ltfish commented Dec 21, 2025

Also:

  • Fix an issue in CallingConventionAnalysis that does not mark prototypes from SimProcedures as not-guessed (certain).

  • Fix an issue where Clinic incorrectly overwrites function prototypes of PLT stubs using callee information.

  • Fix an issue where changing the types of stack variables may not work if the stack variables are accessed via references.

Also:

- Fix an issue in CallingConventionAnalysis that does not mark
prototypes from SimProcedures as not-guessed (certain).

- Fix an issue where Clinic incorrectly overwrites function
prototypes of PLT stubs using callee information.

- Fix an issue where changing the types of stack variables may not work
if the stack variables are accessed via references.
@ltfish ltfish self-assigned this Dec 21, 2025
@ltfish ltfish added the bug Something is broken label Dec 21, 2025
@codecov
Copy link

codecov bot commented Dec 21, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1188 1 1187 70
View the full list of 1 ❄️ flaky test(s)
tests/analyses/decompiler/test_decompiler.py::TestDecompiler::test_decompiling_abnormal_switch_case_case3

Flake rate in main: 47.37% (Passed 70 times, Failed 63 times)

Stack Traces | 13.4s run time
self = <tests.analyses.decompiler.test_decompiler.TestDecompiler testMethod=test_decompiling_abnormal_switch_case_case3>
decompiler_options = None

    def test_decompiling_abnormal_switch_case_case3(self, decompiler_options=None):
        bin_path = os.path.join(test_location, "x86_64", "windows", "msvcr120.dll")
        proj = angr.Project(bin_path, auto_load_libs=False)
    
        cfg = proj.analyses.CFGFast(
            force_smart_scan=False, normalize=True, regions=[(0x18003C330, 0x18003C330 + 0x1000)]
        )
        f = proj.kb.functions[0x18003C330]
        d = proj.analyses[Decompiler].prep(fail_fast=True)(f, cfg=cfg.model, options=decompiler_options)
        print_decompilation_result(d)
        assert d.codegen.text.count("switch") == 1
        # assert d.codegen.text.count("goto LABEL_18003c3fc;") == 2
        # assert d.codegen.text.count("LABEL_18003c3fc:") == 1
        # 16 cases without a default case
        for i in range(16):
            assert f"case {i}:" in d.codegen.text
        assert "default:" not in d.codegen.text
    
        # a0 should be an integer and a1 should be a char pointer
        assert len(d.codegen.cfunc.arg_list) == 3
        arg0, arg1, arg2 = d.codegen.cfunc.arg_list
        arg0_type = arg0.type
        arg1_type = arg1.type
        arg2_type = arg2.type
>       assert isinstance(arg0_type, SimTypePointer), f"Unexpected arg0 type: {arg0_type}"
E       AssertionError: Unexpected arg0 type: unsigned long (64 bits)
E       assert False
E        +  where False = isinstance(unsigned long (64 bits), SimTypePointer)

.../analyses/decompiler/test_decompiler.py:4201: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@angr-bot
Copy link
Member

Corpus decompilation diffs can be found at angr/dec-snapshots@master...angr/angr_5952

@ltfish ltfish merged commit c604fe9 into master Dec 22, 2025
34 of 37 checks passed
@ltfish ltfish deleted the fix/vra_ref_redundant_stack_typevars branch December 22, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants