Skip to content

Commit

Permalink
Relax drcovlib assert to handle rep str expansion (#2700)
Browse files Browse the repository at this point in the history
The changes in ea84da0 to handle displaced vsyscall code in drcovlib's
assert ended up causing asserts for rep str expansion.  We relax the assert
to handle that here.
  • Loading branch information
derekbruening authored and fhahn committed Dec 4, 2017
1 parent 88f9505 commit a7574c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/drcovlib/drcovlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,9 @@ event_basic_block_analysis(void *drcontext, void *tag, instrlist_t *bb,
app_pc pc = instr_get_app_pc(instr);
int len = instr_length(drcontext, instr);
/* -opt_speed (elision) is not supported */
ASSERT(pc != NULL && pc >= start_pc, "-opt_speed is not supported");
/* For rep str expansion pc may be one back from start pc but equal to the tag. */
ASSERT(pc != NULL && (pc >= start_pc || pc == tag_pc),
"-opt_speed is not supported");
if (pc + len > end_pc)
end_pc = pc + len;
}
Expand Down

0 comments on commit a7574c4

Please sign in to comment.