Biohazrd icon indicating copy to clipboard operation
Biohazrd copied to clipboard

Add keeping track of slot numbers for vtable entries and emit placeholders when they're removed

Open PathogenDavid opened this issue 3 years ago • 3 comments

Right now it isn't possible to safely remove a vtable entry in a transformation because vtables are emitted as sequential structs. We should keep track of slot numbers and ensure we emit a padding field when one is missing.

PathogenDavid avatar Dec 03 '20 02:12 PathogenDavid

~~Instead of keeping track of slot numbers, let's change TranslatedVTableEntry to refer to the TranslatedFunction it corresponds to using https://github.com/InfectedLibraries/Biohazrd/issues/150 instead.~~ This issue is actually about something different than I originally thought.

PathogenDavid avatar Jun 21 '21 20:06 PathogenDavid

Note: This is not what PathogenVTableEntry.Offset provides. That's specifically only relevant for VCallOffset, VBaseOffset, and OffsetToTop entries.

PathogenDavid avatar Jun 21 '21 22:06 PathogenDavid

We can fudge this without it, but it'd be a good idea to do this at the same time as https://github.com/InfectedLibraries/Biohazrd/issues/49

PathogenDavid avatar Jun 21 '21 22:06 PathogenDavid