Merge pull request #1 from janbbeck/janbbeck-patch-xsavec

Fix bug in PIN plugin using xsavec
This commit is contained in:
Jan Beck 2019-05-28 13:35:19 +00:00 committed by GitHub
commit 8fa5660a8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -650,6 +650,11 @@ VOID Instruction(INS ins, VOID *v) {
// TODO: Bitch at the PIN folks. // TODO: Bitch at the PIN folks.
return; return;
} }
if(INS_Mnemonic(ins) == "XSAVEC") {
// Avoids "Cannot use IARG_MEMORYWRITE_SIZE on non-standard memory access of instruction at 0xfoo: xsavec ptr [rsp]"
// TODO: Bitch at the PIN folks.
return;
}
for(UINT32 i = 0; i < memOps; i++) { for(UINT32 i = 0; i < memOps; i++) {
if(!filtered && INS_MemoryOperandIsRead(ins, i)) { if(!filtered && INS_MemoryOperandIsRead(ins, i)) {
@ -969,4 +974,3 @@ int main(int argc, char *argv[]) {
process_state.init(PIN_GetPid()); process_state.init(PIN_GetPid());
PIN_StartProgram(); // Note that this unwinds the stack! PIN_StartProgram(); // Note that this unwinds the stack!
} }