mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
rose: define invalid value for program offset
This commit is contained in:
parent
ebe12797e6
commit
a4af801dd1
@ -41,6 +41,7 @@
|
|||||||
#include "miracle.h"
|
#include "miracle.h"
|
||||||
#include "report.h"
|
#include "report.h"
|
||||||
#include "rose.h"
|
#include "rose.h"
|
||||||
|
#include "rose_common.h"
|
||||||
#include "rose_internal.h"
|
#include "rose_internal.h"
|
||||||
#include "rose_program.h"
|
#include "rose_program.h"
|
||||||
#include "rose_types.h"
|
#include "rose_types.h"
|
||||||
@ -1501,6 +1502,7 @@ hwlmcb_rv_t roseRunProgram_i(const struct RoseEngine *t,
|
|||||||
DEBUG_PRINTF("program=%u, offsets [%llu,%llu], flags=%u\n", programOffset,
|
DEBUG_PRINTF("program=%u, offsets [%llu,%llu], flags=%u\n", programOffset,
|
||||||
som, end, prog_flags);
|
som, end, prog_flags);
|
||||||
|
|
||||||
|
assert(programOffset != ROSE_INVALID_PROG_OFFSET);
|
||||||
assert(programOffset >= sizeof(struct RoseEngine));
|
assert(programOffset >= sizeof(struct RoseEngine));
|
||||||
assert(programOffset < t->size);
|
assert(programOffset < t->size);
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "rose_build.h"
|
#include "rose_build.h"
|
||||||
#include "rose_build_util.h"
|
#include "rose_build_util.h"
|
||||||
|
#include "rose_common.h"
|
||||||
#include "rose_graph.h"
|
#include "rose_graph.h"
|
||||||
#include "nfa/mpvcompile.h"
|
#include "nfa/mpvcompile.h"
|
||||||
#include "nfa/goughcompile.h"
|
#include "nfa/goughcompile.h"
|
||||||
@ -441,8 +442,8 @@ struct LitFragment {
|
|||||||
: fragment_id(fragment_id_in), groups(groups_in) {}
|
: fragment_id(fragment_id_in), groups(groups_in) {}
|
||||||
u32 fragment_id;
|
u32 fragment_id;
|
||||||
rose_group groups;
|
rose_group groups;
|
||||||
u32 lit_program_offset = 0;
|
u32 lit_program_offset = ROSE_INVALID_PROG_OFFSET;
|
||||||
u32 delay_program_offset = 0;
|
u32 delay_program_offset = ROSE_INVALID_PROG_OFFSET;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Concrete impl class
|
// Concrete impl class
|
||||||
|
@ -41,4 +41,7 @@
|
|||||||
/** \brief Length in bytes of a reach bitvector, used by the lookaround code. */
|
/** \brief Length in bytes of a reach bitvector, used by the lookaround code. */
|
||||||
#define REACH_BITVECTOR_LEN 32
|
#define REACH_BITVECTOR_LEN 32
|
||||||
|
|
||||||
|
/** \brief Value used to represent an invalid Rose program offset. */
|
||||||
|
#define ROSE_INVALID_PROG_OFFSET 0
|
||||||
|
|
||||||
#endif // ROSE_COMMON_H
|
#endif // ROSE_COMMON_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user