Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: src/trusted/validator/x86/ncval_seg_sfi/ncdecode.c

Issue 9328024: Merge 7712 - Ensure super instructions are marked during dynamic code modification. (Closed) Base URL: svn://svn.chromium.org/native_client/branches/963/src/native_client/
Patch Set: '' Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator/x86/ncval_seg_sfi/ncdecode.c
===================================================================
--- src/trusted/validator/x86/ncval_seg_sfi/ncdecode.c (revision 7726)
+++ src/trusted/validator/x86/ncval_seg_sfi/ncdecode.c (working copy)
@@ -475,8 +475,9 @@
for (dbindex = 0; dbindex < this->inst_buffer_size; ++dbindex) {
this->inst_buffer[dbindex].dstate = this;
this->inst_buffer[dbindex].inst_index = dbindex;
- this->inst_buffer[dbindex].inst_count = 0;
+ this->inst_buffer[dbindex].inst_count = 1;
this->inst_buffer[dbindex].vpc = 0;
+ this->inst_buffer[dbindex].unchanged = FALSE;
NCInstBytesInitMemory(&this->inst_buffer[dbindex].inst.bytes,
&this->memory);
NCInstBytesPtrInit((NCInstBytesPtr*) &this->inst_buffer[dbindex].inst_bytes,
@@ -523,6 +524,7 @@
next_inst->vpc = inst->vpc + inst->inst.bytes.length;
next_inst->dstate->cur_inst_index = next_inst->inst_index;
next_inst->inst_count = inst->inst_count + 1;
+ next_inst->unchanged = FALSE;
return next_inst;
}
@@ -637,7 +639,6 @@
"-%"NACL_PRIxNaClPcAddress"])\n",
(void*) this->memory.mpc, this->vbase, vlimit) );
NCDecoderStateNewSegment(this);
- dinst->inst_count = 1;
while (dinst->vpc < vlimit) {
ConsumeNextInstruction(dinst);
if (this->memory.overflow_count) {
« no previous file with comments | « src/trusted/validator/x86/ncval_seg_sfi/ncdecode.h ('k') | src/trusted/validator/x86/ncval_seg_sfi/ncvalidate.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698