Skip to content

Bug fix: Argument register will be renamed by register_renaming_pass.#79

Closed
wallds wants to merge 1 commit intovtil-project:masterfrom
wallds:patch-3
Closed

Bug fix: Argument register will be renamed by register_renaming_pass.#79
wallds wants to merge 1 commit intovtil-project:masterfrom
wallds:patch-3

Conversation

@wallds
Copy link
Copy Markdown
Contributor

@wallds wallds commented Apr 1, 2023

bug

    auto block = vtil::basic_block::begin(0x1337);

    vtil::register_desc reg_ecx(vtil::register_physical, registers::cx, vtil::arch::bit_count, 0);

    auto sr0 = block->owner->alloc(vtil::arch::bit_count);

    // The ecx register here is a potential function argument, register_renaming_pass should not work here.
    block->mov(reg_ecx, (uintptr_t)0x880000);
    block->vxcall((uintptr_t)0x10000);

    auto block2 = block->fork(0x2000);
    block2->mov(sr0, reg_ecx);
    block2->mov(reg_ecx, (uintptr_t)1);
    block2->mov(reg_ecx, sr0);
    block2->vxcall((uintptr_t)0x10000);

    auto block3 = block2->fork(0x3000);
    block3->vexit(0ull); // marks the end of a basic_block

    vtil::logger::log(":: Before:\n");
    vtil::debug::dump(block->owner);

    vtil::optimizer::register_renaming_pass{}(block->owner);

    vtil::logger::log(":: After:\n");
    vtil::debug::dump(block->owner);

1

@ghost

This comment was marked as spam.

dword64 added a commit to dword64/VTIL-Core that referenced this pull request Apr 1, 2026
can1357 added a commit that referenced this pull request Apr 1, 2026
Fix tracer recursion stack overflows (#52, #78) by combining #79/#81; update Capstone/Keystone deps
@dword64
Copy link
Copy Markdown
Member

dword64 commented Apr 1, 2026

#83

@dword64 dword64 closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants