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

Side by Side Diff: src/trusted/validator_ragel/gen/validator_x86_32.c

Issue 10860010: Fix uint8_t/unit32_t mix, always use wordsize access (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 4 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 /* native_client//home/khim/work/nacl/native_client/src/trusted/validator_ragel/ gen/validator_x86_32.c 1 /* native_client//home/khim/work/nacl/native_client/src/trusted/validator_ragel/ gen/validator_x86_32.c
2 * THIS FILE IS AUTO-GENERATED. DO NOT EDIT. 2 * THIS FILE IS AUTO-GENERATED. DO NOT EDIT.
3 * Compiled for ia32 mode. 3 * Compiled for ia32 mode.
4 */ 4 */
5 5
6 #include <assert.h> 6 #include <assert.h>
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 17 matching lines...) Expand all
28 static const int x86_32_validator_en_main = 246; 28 static const int x86_32_validator_en_main = 246;
29 29
30 30
31 31
32 32
33 Bool ValidateChunkIA32(const uint8_t *data, size_t size, 33 Bool ValidateChunkIA32(const uint8_t *data, size_t size,
34 enum validation_options options, 34 enum validation_options options,
35 const NaClCPUFeaturesX86 *cpu_features, 35 const NaClCPUFeaturesX86 *cpu_features,
36 validation_callback_func user_callback, 36 validation_callback_func user_callback,
37 void *callback_data) { 37 void *callback_data) {
38 uint8_t *valid_targets = BitmapAllocate(size); 38 bitmap_word *valid_targets = BitmapAllocate(size);
39 uint8_t *jump_dests = BitmapAllocate(size); 39 bitmap_word *jump_dests = BitmapAllocate(size);
40 const uint8_t *current_position; 40 const uint8_t *current_position;
41 const uint8_t *end_of_bundle; 41 const uint8_t *end_of_bundle;
42 int result = TRUE; 42 int result = TRUE;
43 43
44 CHECK(size % kBundleSize == 0); 44 CHECK(size % kBundleSize == 0);
45 45
46 if (!valid_targets || !jump_dests) { 46 if (!valid_targets || !jump_dests) {
47 result = FALSE; 47 result = FALSE;
48 goto error_detected; 48 goto error_detected;
49 } 49 }
(...skipping 9515 matching lines...) Expand 10 before | Expand all | Expand 10 after
9565 } 9565 }
9566 9566
9567 result &= ProcessInvalidJumpTargets(data, size, valid_targets, jump_dests, 9567 result &= ProcessInvalidJumpTargets(data, size, valid_targets, jump_dests,
9568 user_callback, callback_data); 9568 user_callback, callback_data);
9569 9569
9570 error_detected: 9570 error_detected:
9571 free(jump_dests); 9571 free(jump_dests);
9572 free(valid_targets); 9572 free(valid_targets);
9573 return result; 9573 return result;
9574 } 9574 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698