| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |