Skip to content

Commit

Permalink
Fix bug in vftablebelongstoclass
Browse files Browse the repository at this point in the history
Fix #232
  • Loading branch information
sei-eschwartz committed Jul 11, 2022
1 parent f7af90d commit cf77c93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions share/prolog/oorules/rules.pl
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,10 @@
!,
find(Method, Class),
factVFTableWrite(Insn, Method, Offset, VFTable),
% Verify that this vftable write is in method's this class
possibleVFTableWrite(Insn, Method, ThisPtr, Offset, VFTable),
funcParameter(Method, ecx, ThisPtr),

This comment has been minimized.

Copy link
@Trass3r

Trass3r Jul 12, 2022

Contributor

This looks quite calling convention specific.

This comment has been minimized.

Copy link
@sei-eschwartz

sei-eschwartz Jul 12, 2022

Author Collaborator

It is. But master largely assumes thiscall. I am working on #229 that is improving how we handle calling conventions.


VFTableWrite=factVFTableWrite(Insn, Method, Offset, VFTable),

% ejs 10/9/20: We found the destructor rule was applying to a method which we had not
Expand Down Expand Up @@ -1078,6 +1082,9 @@
% Free, _, Free: OK
reasonVFTableBelongsToClass(VFTable, Offset, Class, Rule, VFTableWrite) :-
factVFTableWrite(Insn, Method, Offset, VFTable),
% Verify that this vftable write is in method's this class
possibleVFTableWrite(Insn, Method, ThisPtr, Offset, VFTable),
funcParameter(Method, ecx, ThisPtr),
VFTableWrite=factVFTableWrite(Insn, Method, Offset, VFTable),
find(Method, Class),

Expand Down

0 comments on commit cf77c93

Please sign in to comment.