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

Side by Side Diff: src/trusted/validator/x86/ncval_seg_sfi/ncvalidate_detailed.c

Issue 10116004: Eliminate bundle_size parameter from validator interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * ncvalidate_details.c 8 * ncvalidate_details.c
9 * Attach detailed error reporter to the NaCl validator. Does a second 9 * Attach detailed error reporter to the NaCl validator. Does a second
10 * walk of the instructions to find instructions that explicitly branch 10 * walk of the instructions to find instructions that explicitly branch
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 dstate->new_segment_fn = (NCDecoderStateMethod) NCNullDecoderStateMethod; 146 dstate->new_segment_fn = (NCDecoderStateMethod) NCNullDecoderStateMethod;
147 dstate->internal_error_fn = (NCDecoderStateMethod) NCNullDecoderStateMethod; 147 dstate->internal_error_fn = (NCDecoderStateMethod) NCNullDecoderStateMethod;
148 dstate->internal_error_fn = (NCDecoderStateMethod) NCStatsInternalError; 148 dstate->internal_error_fn = (NCDecoderStateMethod) NCStatsInternalError;
149 NCDecoderStateSetErrorReporter(dstate, reporter); 149 NCDecoderStateSetErrorReporter(dstate, reporter);
150 NCDecoderStateDecode(dstate); 150 NCDecoderStateDecode(dstate);
151 } 151 }
152 152
153 struct NCValidatorState *NCValidateInitDetailed( 153 struct NCValidatorState *NCValidateInitDetailed(
154 const NaClPcAddress vbase, 154 const NaClPcAddress vbase,
155 const NaClMemorySize codesize, 155 const NaClMemorySize codesize,
156 const uint8_t alignment,
157 const NaClCPUFeaturesX86* features) { 156 const NaClCPUFeaturesX86* features) {
158 struct NCValidatorState *vstate = NCValidateInit(vbase, codesize, alignment, 157 struct NCValidatorState *vstate = NCValidateInit(vbase, codesize,
159 FALSE, features); 158 FALSE, features);
160 if (NULL != vstate) { 159 if (NULL != vstate) {
161 vstate->summarize_fn = NCJumpSummarizeDetailed; 160 vstate->summarize_fn = NCJumpSummarizeDetailed;
162 vstate->pattern_nonfirst_insts_table = 161 vstate->pattern_nonfirst_insts_table =
163 (uint8_t *)calloc(NCIATOffset(codesize) + 1, 1); 162 (uint8_t *)calloc(NCIATOffset(codesize) + 1, 1);
164 if (NULL == vstate->pattern_nonfirst_insts_table) { 163 if (NULL == vstate->pattern_nonfirst_insts_table) {
165 if (NULL != vstate->kttable) free(vstate->kttable); 164 if (NULL != vstate->kttable) free(vstate->kttable);
166 if (NULL != vstate->vttable) free(vstate->vttable); 165 if (NULL != vstate->vttable) free(vstate->vttable);
167 free(vstate); 166 free(vstate);
168 return NULL; 167 return NULL;
169 } 168 }
170 } 169 }
171 return vstate; 170 return vstate;
172 } 171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698