Skip to content

Commit

Permalink
Merge branch 'only-discard-in-between-int3' into 'main'
Browse files Browse the repository at this point in the history
discard only int3 instructions that are sorrounded by int3s before and after.

See merge request rewriting/ddisasm!1223
  • Loading branch information
aeflores committed Oct 10, 2024
2 parents 8c21920 + d9fd2b6 commit a1b0312
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/datalog/binary/pe/pe_binaries.dl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ symbol(EA,0,"NOTYPE","GLOBAL","DEFAULT",0,"export",as(Ordinal,unsigned),Function
is_padding(EA+1):-
binary_format("PE"),
instruction_get_operation(EA,"INT3"),
instruction_get_operation(EA+1,"INT3").
instruction_get_operation(EA+1,"INT3"),
instruction_get_operation(EA+2,"INT3").

/**
Non-destructive multi-byte NOPs used by the MSVC compiler. (See `listing.inc'.)
Expand Down
3 changes: 2 additions & 1 deletion src/datalog/code_inference.dl
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ invalid(EA+1,"INT3"):-
binary_isa("X64")
),
instruction_get_operation(EA,"INT3"),
instruction_get_operation(EA+1,"INT3").
instruction_get_operation(EA+1,"INT3"),
instruction_get_operation(EA+2,"INT3").

.decl possible_ea(EA:address) inline

Expand Down

0 comments on commit a1b0312

Please sign in to comment.