| Index: src/trusted/validator_ragel/validator_internal.h
|
| ===================================================================
|
| --- src/trusted/validator_ragel/validator_internal.h (revision 9857)
|
| +++ src/trusted/validator_ragel/validator_internal.h (working copy)
|
| @@ -14,7 +14,7 @@
|
|
|
| #include "native_client/src/shared/platform/nacl_check.h"
|
| #include "native_client/src/shared/utils/types.h"
|
| -#include "native_client/src/trusted/validator_ragel/unreviewed/decoder_internal.h"
|
| +#include "native_client/src/trusted/validator_ragel/unreviewed/decoding.h"
|
| #include "native_client/src/trusted/validator_ragel/unreviewed/validator.h"
|
|
|
| /* Maximum set of R-DFA allowable CPUID features. */
|
| @@ -304,7 +304,8 @@
|
| ((((bitmap_word)1) << bits) - 1) << (index % NACL_HOST_WORDSIZE);
|
| }
|
|
|
| -/* Mark the destination of a jump instruction and make an early validity check:
|
| +/*
|
| + * Mark the destination of a jump instruction and make an early validity check:
|
| * to jump outside given code region, the target address must be aligned.
|
| *
|
| * Returns TRUE iff the jump passes the early validity check.
|
| @@ -322,7 +323,22 @@
|
| return TRUE;
|
| }
|
|
|
| +/*
|
| + * Mark the gived address as valid jump target address.
|
| + */
|
| +static FORCEINLINE void MakeJumpTargetValid(size_t address,
|
| + bitmap_word *valid_targets) {
|
| + BitmapSetBit(valid_targets, address);
|
| +}
|
|
|
| +/*
|
| + * Mark the gived address as invalid jump target address.
|
| + */
|
| +static FORCEINLINE void MakeJumpTargetInvalid(size_t address,
|
| + bitmap_word *valid_targets) {
|
| + BitmapClearBit(valid_targets, address);
|
| +}
|
| +
|
| static INLINE Bool ProcessInvalidJumpTargets(
|
| const uint8_t *data,
|
| size_t size,
|
|
|