mirror of
https://github.com/vtil-project/VTIL-Core
synced 2026-08-17 08:23:03 -04:00
Fix test_access
This commit is contained in:
parent
36ae17d153
commit
611c274b2e
2 changed files with 16 additions and 16 deletions
|
|
@ -202,7 +202,7 @@ namespace vtil
|
|||
{ register_physical, X86_REG_EBP, 32 },
|
||||
|
||||
/*.shadow_space =*/
|
||||
0x20,
|
||||
0x0,
|
||||
|
||||
/*.purge_stack =*/
|
||||
true,
|
||||
|
|
|
|||
|
|
@ -380,23 +380,23 @@ namespace vtil::symbolic
|
|||
|
||||
// If vmexit, declared trashed if below or at the shadow space:
|
||||
//
|
||||
if ( cwrite )
|
||||
if ( cwrite && cc.purge_stack)
|
||||
{
|
||||
if ( it->base == &ins::vexit ? it.block->owner->routine_convention.purge_stack : cc.purge_stack )
|
||||
{
|
||||
// Determine the limit of the stack memory owned by this routine.
|
||||
//
|
||||
expression limit =
|
||||
tracer->trace( { it, REG_SP } ) +
|
||||
it.block->sp_offset +
|
||||
cc.shadow_space;
|
||||
// Determine the limit of the stack memory owned by this routine.
|
||||
//
|
||||
expression limit =
|
||||
tracer->trace( { it, REG_SP } ) +
|
||||
it.block->sp_offset +
|
||||
( it->base == &ins::vexit ? 0 : cc.shadow_space );
|
||||
|
||||
// Calculate the displacement, if constant below 0, declare trashed.
|
||||
//
|
||||
access_details details;
|
||||
fill_displacement( &details, mem.base, pointer{ std::move( limit ) }, tracer, xblock );
|
||||
if ( !details.is_unknown() && ( details.bit_offset + var.bit_count() ) <= 0 )
|
||||
result += { .bit_offset = 0, .bit_count = var.bit_count(), .read = false, .write = true };
|
||||
// Calculate the displacement, if constant below 0, declare trashed.
|
||||
//
|
||||
access_details details;
|
||||
fill_displacement( &details, mem.base, pointer{ std::move( limit ) }, tracer, xblock );
|
||||
if ( !details.is_unknown() && ( details.bit_offset + var.bit_count() ) <= 0 )
|
||||
{
|
||||
result += { .bit_offset = 0, .bit_count = var.bit_count(), .read = false, .write = true };
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue