diff --git a/CHANGELOG.md b/CHANGELOG.md index 8de3a8d6c..03b37abec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,7 +47,7 @@ This is a list of notable changes to Hyperscan, in reverse chronological order. - Bugfix for issue #239: fix hyperscan compile issue under gcc-10. - Add VLAN packets processing capability in pcap analysis script. (#214) - Avoid extra convert instruction for "Noodle". (#221) -- Add Hyperscan version marcro in `hs.h`. (#222) +- Add Hyperscan version macro in `hs.h`. (#222) ## [5.2.1] 2019-10-13 - Bugfix for issue #186: fix compile issue when `BUILD_SHARED_LIBS` is on in @@ -57,7 +57,7 @@ This is a list of notable changes to Hyperscan, in reverse chronological order. ## [5.2.0] 2019-07-12 - Literal API: add new API `hs_compile_lit()` and `hs_compile_lit_multi()` to process pure literal rule sets. The 2 literal APIs treat each expression text - in a literal sense without recognizing any regular grammers. + in a literal sense without recognizing any regular grammars. - Logical combination: add support for purely negative combinations, which report match at EOD in case of no sub-expressions matched. - Windows porting: support shared library (DLL) on Windows with available tools @@ -71,7 +71,7 @@ This is a list of notable changes to Hyperscan, in reverse chronological order. ## [5.1.1] 2019-04-03 - Add extra detection and handling when invalid rose programs are triggered. -- Bugfix for issue #136: fix CMake parsing of CPU architecure for GCC-9. +- Bugfix for issue #136: fix CMake parsing of CPU architecture for GCC-9. - Bugfix for issue #137: avoid file path impact on fat runtime build. - Bugfix for issue #141: fix rose literal programs for multi-pattern matching when no pattern ids are provided. @@ -330,7 +330,7 @@ This is a list of notable changes to Hyperscan, in reverse chronological order. line with the behaviour of `hs_close_stream()`. - Disallow bounded repeats with a very large minimum repeat but no maximum, i.e. {N,} for very large N. -- Reduce compile memory usage in literal set explansion for some large cases. +- Reduce compile memory usage in literal set expansion for some large cases. ## [4.0.0] 2015-10-20 - Original release of Hyperscan as open-source software. diff --git a/README.md b/README.md index 9f4c03723..b511a029a 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ project repository. # Versioning -The `master` branch on Github will always contain the most recent release of +The `master` branch on GitHub will always contain the most recent release of Hyperscan. Each version released to `master` goes through QA and testing before it is released; if you're a user, rather than a developer, this is the version you should be using. @@ -36,7 +36,7 @@ The official homepage for Hyperscan is at [www.hyperscan.io](https://www.hypersc If you have questions or comments, we encourage you to [join the mailing list](https://lists.01.org/mailman/listinfo/hyperscan). Bugs can be filed by -sending email to the list, or by creating an issue on Github. +sending email to the list, or by creating an issue on GitHub. If you wish to contact the Hyperscan team at Intel directly, without posting publicly to the mailing list, send email to diff --git a/chimera/ch_common.h b/chimera/ch_common.h index bdb0bafa9..b10f0220f 100644 --- a/chimera/ch_common.h +++ b/chimera/ch_common.h @@ -129,7 +129,7 @@ ch_error_t HS_CDECL ch_database_info(const ch_database_t *database, * more memory at runtime as required. * * If Chimera is to be used in a multi-threaded, or similarly concurrent - * environment, the allocation function will need to be re-entrant, or + * environment, the allocation function will need to be reentrant, or * similarly safe for concurrent use. * * @param size diff --git a/doc/dev-reference/chimera.rst b/doc/dev-reference/chimera.rst index d35b116f5..9d5e0c64f 100644 --- a/doc/dev-reference/chimera.rst +++ b/doc/dev-reference/chimera.rst @@ -204,7 +204,7 @@ databases, only a single scratch region is necessary: in this case, calling will ensure that the scratch space is large enough to support scanning against any of the given databases. -While the Chimera library is re-entrant, the use of scratch spaces is not. +While the Chimera library is reentrant, the use of scratch spaces is not. For example, if by design it is deemed necessary to run recursive or nested scanning (say, from the match callback function), then an additional scratch space is required for that context. diff --git a/doc/dev-reference/hyperscan.doxyfile.in b/doc/dev-reference/hyperscan.doxyfile.in index b9eaf078b..d7889d6fb 100644 --- a/doc/dev-reference/hyperscan.doxyfile.in +++ b/doc/dev-reference/hyperscan.doxyfile.in @@ -268,7 +268,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed @@ -659,7 +659,7 @@ SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the +# popen()) the command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. @@ -1424,7 +1424,7 @@ EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # @@ -1436,7 +1436,7 @@ FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering +# http://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path @@ -1506,7 +1506,7 @@ MATHJAX_CODEFILE = SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a web server instead of a web client using Javascript. There +# implemented using a web server instead of a web client using JavaScript. There # are two flavors of web server based searching depending on the EXTERNAL_SEARCH # setting. When disabled, doxygen will generate a PHP script for searching and # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing diff --git a/doc/dev-reference/performance.rst b/doc/dev-reference/performance.rst index 23781bd61..71270dd5c 100644 --- a/doc/dev-reference/performance.rst +++ b/doc/dev-reference/performance.rst @@ -316,7 +316,7 @@ see reduced performance when the single-match flag is used. Start of Match flag ******************** -.. tip:: Do not request Start of Match information if it is not not needed. +.. tip:: Do not request Start of Match information if it is not needed. Start of Match (SOM) information can be expensive to gather and can require large amounts of stream state to store in streaming mode. As such, SOM diff --git a/doc/dev-reference/runtime.rst b/doc/dev-reference/runtime.rst index 396521c94..1538a9a63 100644 --- a/doc/dev-reference/runtime.rst +++ b/doc/dev-reference/runtime.rst @@ -170,7 +170,7 @@ databases, only a single scratch region is necessary: in this case, calling will ensure that the scratch space is large enough to support scanning against any of the given databases. -While the Hyperscan library is re-entrant, the use of scratch spaces is not. +While the Hyperscan library is reentrant, the use of scratch spaces is not. For example, if by design it is deemed necessary to run recursive or nested scanning (say, from the match callback function), then an additional scratch space is required for that context. diff --git a/src/fdr/fdr_compile.cpp b/src/fdr/fdr_compile.cpp index fcfc08638..74020e4f1 100644 --- a/src/fdr/fdr_compile.cpp +++ b/src/fdr/fdr_compile.cpp @@ -742,7 +742,7 @@ void buildSquashMask(vector &lits, u32 id1, u32 bucket1, return; } /* if lit2 is a suffix but doesn't pass included checks for - * extra info, we give up sqaushing */ + * extra info, we give up squashing */ if (includedCheck(lit1, lit2)) { DEBUG_PRINTF("find exceptional suffix %u\n", lit2.id); exception_map[id1].insert(id2); diff --git a/src/hs.cpp b/src/hs.cpp index eac588891..5383d2ee0 100644 --- a/src/hs.cpp +++ b/src/hs.cpp @@ -334,7 +334,7 @@ hs_compile_lit_multi_int(const char *const *expressions, const unsigned *flags, if (!checkPlatform(platform, comp_error)) { *db = nullptr; - assert(*comp_error); // set by checkPlattform. + assert(*comp_error); // set by checkPlatform. return HS_COMPILER_ERROR; } @@ -399,7 +399,7 @@ hs_compile_lit_multi_int(const char *const *expressions, const unsigned *flags, return HS_COMPILER_ERROR; } catch (...) { - assert(!"Internal errror, unexpected exception"); + assert(!"Internal error, unexpected exception"); *db = nullptr; *comp_error = const_cast(&hs_einternal); return HS_COMPILER_ERROR; diff --git a/src/hs_common.h b/src/hs_common.h index 93dc1fe8a..18ee8d8a6 100644 --- a/src/hs_common.h +++ b/src/hs_common.h @@ -277,7 +277,7 @@ hs_error_t HS_CDECL hs_serialized_database_info(const char *bytes, * allocate stream state. * * If Hyperscan is to be used in a multi-threaded, or similarly concurrent - * environment, the allocation function will need to be re-entrant, or + * environment, the allocation function will need to be reentrant, or * similarly safe for concurrent use. * * @param size diff --git a/src/hs_runtime.h b/src/hs_runtime.h index 6d34b6c48..ec9ab674f 100644 --- a/src/hs_runtime.h +++ b/src/hs_runtime.h @@ -96,7 +96,7 @@ typedef struct hs_scratch hs_scratch_t; * @param from * - If a start of match flag is enabled for the current pattern, this * argument will be set to the start of match for the pattern assuming - * that that start of match value lies within the current 'start of match + * that the start of match value lies within the current 'start of match * horizon' chosen by one of the SOM_HORIZON mode flags. * - If the start of match value lies outside this horizon (possible only diff --git a/src/nfa/goughcompile.cpp b/src/nfa/goughcompile.cpp index d41c6f423..cf7fbeaee 100644 --- a/src/nfa/goughcompile.cpp +++ b/src/nfa/goughcompile.cpp @@ -270,7 +270,7 @@ void makeCFG_edge(GoughGraph &cfg, const map &som_creators, u32 adjust = som_creators.at(input_slot); if (vnew && vnew->adjust >= adjust) { - DEBUG_PRINTF("skipping %u as domininated by adj%u\n", + DEBUG_PRINTF("skipping %u as dominated by adj%u\n", adjust, vnew->adjust); continue; /* deeper starts can be seen to statically dominate */ diff --git a/src/nfa/mcsheng_compile.cpp b/src/nfa/mcsheng_compile.cpp index fb75e49a3..c52845366 100644 --- a/src/nfa/mcsheng_compile.cpp +++ b/src/nfa/mcsheng_compile.cpp @@ -546,7 +546,7 @@ dstate_id_t find_sheng_states(dfa_info &info, continue; } DEBUG_PRINTF("considering cyclic %zu\n", g[v].index); - /* get an estimate of stickness of the cyclic: assume any edges from + /* get an estimate of stickiness of the cyclic: assume any edges from * states with larger state ids are back edges */ CharReach est_back_reach; for (const auto &u : inv_adjacent_vertices_range(v, g)) { diff --git a/src/nfa/nfa_api.h b/src/nfa/nfa_api.h index e3f7f7431..e12e08800 100644 --- a/src/nfa/nfa_api.h +++ b/src/nfa/nfa_api.h @@ -62,7 +62,7 @@ enum nfa_zombie_status { * to a corresponding compressed stream state (@ref mq::streamState). * * @param nfa engine the state belongs to - * @param q queue for the engine. The final compressed stream stream is placed + * @param q queue for the engine. The final compressed stream is placed * in the location indicated by @ref mq::streamState * @param loc the location corresponding to the engine's current state */ diff --git a/src/nfa/nfa_dump_api.h b/src/nfa/nfa_dump_api.h index a0c4a9c99..8d21a607b 100644 --- a/src/nfa/nfa_dump_api.h +++ b/src/nfa/nfa_dump_api.h @@ -43,7 +43,7 @@ namespace ue2 { /** * \brief Dump files representing the engine. All files dumped should begin with - * path/prefix specified by base. Generally a text file and a grpahviz (dot) + * path/prefix specified by base. Generally a text file and a graphviz (dot) * files should be produced. */ void nfaGenerateDumpFiles(const struct NFA *nfa, const std::string &base); diff --git a/src/nfagraph/ng_anchored_dots.cpp b/src/nfagraph/ng_anchored_dots.cpp index 9a13376d1..1b85591bc 100644 --- a/src/nfagraph/ng_anchored_dots.cpp +++ b/src/nfagraph/ng_anchored_dots.cpp @@ -216,7 +216,7 @@ void reformAnchoredRepeatsComponent(NGHolder &g, } if (!otherV.empty()) { - /* We require that the successors of the dot node are are the same + /* We require that the successors of the dot node are the same * as the start vertex. TODO: remember why. */ if (selfLoop) { diff --git a/src/nfagraph/ng_depth.cpp b/src/nfagraph/ng_depth.cpp index 6c90326ce..159ba5e87 100644 --- a/src/nfagraph/ng_depth.cpp +++ b/src/nfagraph/ng_depth.cpp @@ -326,7 +326,7 @@ vector calcRevDepths(const NGHolder &g) { calcAndStoreDepth( rg, g.accept, deadNodes, dMin, dMax, depths, &NFAVertexRevDepth::toAccept); - DEBUG_PRINTF("doing accepteod\n"); + DEBUG_PRINTF("doing acceptEod\n"); deadNodes[NODE_ACCEPT] = true; // Hide accept->acceptEod edge. calcAndStoreDepth( rg, g.acceptEod, deadNodes, dMin, dMax, depths, @@ -367,7 +367,7 @@ vector calcBidiDepths(const NGHolder &g) { calcAndStoreDepth( rg, g.accept, deadNodes, dMin, dMax, depths, &NFAVertexBidiDepth::toAccept); - DEBUG_PRINTF("doing accepteod\n"); + DEBUG_PRINTF("doing acceptEod\n"); deadNodes[NODE_ACCEPT] = true; // Hide accept->acceptEod edge. calcAndStoreDepth( rg, g.acceptEod, deadNodes, dMin, dMax, depths, diff --git a/src/nfagraph/ng_equivalence.cpp b/src/nfagraph/ng_equivalence.cpp index a42a0ac71..f687e79bf 100644 --- a/src/nfagraph/ng_equivalence.cpp +++ b/src/nfagraph/ng_equivalence.cpp @@ -508,7 +508,7 @@ void mergeClass(vector> &infos, NGHolder &g, /* For left equivalence, if the members have different reporting behaviour * we sometimes require two vertices to be created (one connected to accept - * and one to accepteod) */ + * and one to acceptEod) */ NFAVertex old_v = (*cur_class_vertices.begin())->v; NFAVertex new_v = clone_vertex(g, old_v); /* set up new vertex with same diff --git a/src/nfagraph/ng_literal_analysis.cpp b/src/nfagraph/ng_literal_analysis.cpp index d25ac43e8..5da1094c1 100644 --- a/src/nfagraph/ng_literal_analysis.cpp +++ b/src/nfagraph/ng_literal_analysis.cpp @@ -874,7 +874,7 @@ bool literalIsWholeGraph(const NGHolder &g, const ue2_literal &lit) { const CharReach &cr_l = *it; if (!cr_l.isSubsetOf(cr_g)) { - /* running over the prefix is needed to prevent false postives */ + /* running over the prefix is needed to prevent false positives */ DEBUG_PRINTF("reach fail\n"); return false; } diff --git a/src/nfagraph/ng_violet.cpp b/src/nfagraph/ng_violet.cpp index 78d73082a..5c2d9dcad 100644 --- a/src/nfagraph/ng_violet.cpp +++ b/src/nfagraph/ng_violet.cpp @@ -1304,7 +1304,7 @@ void splitEdgesByCut(NGHolder &h, RoseInGraph &vg, vector adj; insert(&adj, adj.end(), adjacent_vertices(pivot, h)); - /* we can ignore presence of accept, accepteod in adj as it is best + /* we can ignore presence of accept, acceptEod in adj as it is best effort */ if (!contains(done_rhs, adj)) { @@ -2018,7 +2018,7 @@ bool improvePrefix(NGHolder &h, RoseInGraph &vg, const vector &ee, return true; } - /* large back edges may prevent us identifing anchored or transient cases + /* large back edges may prevent us identifying anchored or transient cases * properly - use a simple walk instead */ if (doNetflowCut(h, &depths, vg, ee, true, cc.grey)) { @@ -2218,7 +2218,7 @@ bool improveInfix(NGHolder &h, RoseInGraph &vg, const vector &ee, /* look for netflow cuts which don't produce good prefixes */ bool rv = doNetflowCut(h, nullptr, vg, ee, false, cc.grey, 8); - DEBUG_PRINTF("did netfow cut? = %d\n", (int)rv); + DEBUG_PRINTF("did netflow cut? = %d\n", (int)rv); return rv; } @@ -2655,7 +2655,7 @@ bool lookForTrailingLiteralDotStar(const NGHolder &h, /* In streaming mode, active engines have to be caught up at stream boundaries * and have to be stored in stream state, so we prefer to decompose patterns - * in to literals with no state between them if possible. */ + * into literals with no state between them if possible. */ static void decomposeLiteralChains(RoseInGraph &vg, const CompileContext &cc) { if (!cc.grey.violetLiteralChains) { diff --git a/src/parser/Parser.rl b/src/parser/Parser.rl index 8643aebfc..48ddfaf0f 100644 --- a/src/parser/Parser.rl +++ b/src/parser/Parser.rl @@ -1549,7 +1549,7 @@ unichar readUtf8CodePoint4c(const char *s) { # Oniguruma - either angle braces or single quotes for this one ('\\g<' [^>]*? '>'|'\\g\'' [^\']*? '\'') => { ostringstream str; - str << "Onigiruma subroutine call at index " << ts - ptr << + str << "Oniguruma subroutine call at index " << ts - ptr << " not supported."; throw ParseError(str.str()); }; diff --git a/src/rose/program_runtime.c b/src/rose/program_runtime.c index ff5a5099c..696be2243 100644 --- a/src/rose/program_runtime.c +++ b/src/rose/program_runtime.c @@ -1245,7 +1245,7 @@ int roseCheckSingleLookaround(const struct RoseEngine *t, } /** - * \brief Scan around a literal, checking that that "lookaround" reach masks + * \brief Scan around a literal, checking that "lookaround" reach masks * are satisfied. */ static rose_inline diff --git a/src/rose/rose_build_groups.cpp b/src/rose/rose_build_groups.cpp index 209889e55..971a996c3 100644 --- a/src/rose/rose_build_groups.cpp +++ b/src/rose/rose_build_groups.cpp @@ -75,17 +75,17 @@ bool superStrong(const rose_literal_id &lit) { static bool eligibleForAlwaysOnGroup(const RoseBuildImpl &build, u32 id) { - auto eligble = [&](RoseVertex v) { + auto eligible = [&](RoseVertex v) { return build.isRootSuccessor(v) && (!build.g[v].left || !isAnchored(build.g[v].left)); }; - if (any_of_in(build.literal_info[id].vertices, eligble)) { + if (any_of_in(build.literal_info[id].vertices, eligible)) { return true; } for (u32 delayed_id : build.literal_info[id].delayed_ids) { - if (any_of_in(build.literal_info[delayed_id].vertices, eligble)) { + if (any_of_in(build.literal_info[delayed_id].vertices, eligible)) { return true; } } diff --git a/src/rose/rose_build_merge.cpp b/src/rose/rose_build_merge.cpp index 5066dbd57..5a6099509 100644 --- a/src/rose/rose_build_merge.cpp +++ b/src/rose/rose_build_merge.cpp @@ -531,7 +531,7 @@ bool checkPrefix(const rose_literal_id &ul, const u32 ulag, } size_t min_allowed_delta = vlag - ulag; - DEBUG_PRINTF("min allow distace %zu\n", min_allowed_delta); + DEBUG_PRINTF("min allow distance %zu\n", min_allowed_delta); for (size_t i = 0; i < min_allowed_delta; i++) { if (stringsCanFinishAtSameSpot(ul.s, vl.s.begin(), vl.s.end() - i)) { diff --git a/src/rose/rose_build_program.cpp b/src/rose/rose_build_program.cpp index 96c95dbf0..634ddc3d9 100644 --- a/src/rose/rose_build_program.cpp +++ b/src/rose/rose_build_program.cpp @@ -1646,7 +1646,7 @@ RoseProgram makeLitInitialProgram(const RoseBuildImpl &build, prog_build.floatingMinLiteralMatchOffset, program); - /* Check if we are able to deliever matches from the anchored table now */ + /* Check if we are able to deliver matches from the anchored table now */ if (!is_anchored_replay_program) { makeAnchoredLiteralDelay(build, prog_build, lit_id, program); } diff --git a/src/rose/rose_program.h b/src/rose/rose_program.h index 7e21303cb..910e43ab5 100644 --- a/src/rose/rose_program.h +++ b/src/rose/rose_program.h @@ -307,7 +307,7 @@ struct ROSE_STRUCT_CHECK_BYTE { u32 fail_jump; //!< Jump forward this many bytes on failure. }; -// Since m128 and m256 could be missaligned in the bytecode, +// Since m128 and m256 could be misaligned in the bytecode, // we'll use u8[16] and u8[32] instead in all rose_check_shufti structures. struct ROSE_STRUCT_CHECK_SHUFTI_16x8 { u8 code; //!< From enum RoseInstructionCode. diff --git a/src/util/charreach_util.h b/src/util/charreach_util.h index f0dc4227b..fb857b94b 100644 --- a/src/util/charreach_util.h +++ b/src/util/charreach_util.h @@ -45,7 +45,7 @@ void make_caseless(CharReach *cr); void fill_bitvector(const CharReach &cr, u8 *bits); /** - * \brief Generate and and compare masks for checking the char reach. + * \brief Generate and compare masks for checking the char reach. * * Any character c in cr will be result in (c & and_mask) == cmp_mask being true. * Note: characters not in cr may also pass the and/cmp checks. diff --git a/src/util/logical.h b/src/util/logical.h index 0c8b6469a..a1b706b67 100644 --- a/src/util/logical.h +++ b/src/util/logical.h @@ -69,7 +69,7 @@ struct CombInfo { u64a max_offset; }; -/** Temporarily use to seperate operations' id from reports' lkey +/** Temporarily use to separate operations' id from reports' lkey * when building logicalTree in shunting yard algorithm, * operations' id will be finally renumbered following reports' lkey. */ #define LOGICAL_OP_BIT 0x80000000UL diff --git a/src/util/multibit_compress.h b/src/util/multibit_compress.h index e7b4fd8e8..7b4e2078b 100644 --- a/src/util/multibit_compress.h +++ b/src/util/multibit_compress.h @@ -200,5 +200,5 @@ char mmbit_decompress(u8 *bits, u32 total_bits, const u8 *comp, } // extern "C" #endif -#endif // MULTBIT_COMPRESS_H +#endif // MULTIBIT_COMPRESS_H diff --git a/src/util/simd_utils.h b/src/util/simd_utils.h index d1f060b07..fab0b11ed 100644 --- a/src/util/simd_utils.h +++ b/src/util/simd_utils.h @@ -159,13 +159,13 @@ static really_inline u32 movd(const m128 in) { #if defined(HAVE_AVX512) static really_inline u32 movd512(const m512 in) { // NOTE: seems gcc doesn't support _mm512_cvtsi512_si32(in), - // so we use 2-step convertions to work around. + // so we use 2-step conversions to work around. return _mm_cvtsi128_si32(_mm512_castsi512_si128(in)); } static really_inline u64a movq512(const m512 in) { // NOTE: seems AVX512 doesn't support _mm512_cvtsi512_si64(in), - // so we use 2-step convertions to work around. + // so we use 2-step conversions to work around. return _mm_cvtsi128_si64(_mm512_castsi512_si128(in)); } #endif diff --git a/tools/hsbench/engine_chimera.h b/tools/hsbench/engine_chimera.h index 187dec8cb..43b33a055 100644 --- a/tools/hsbench/engine_chimera.h +++ b/tools/hsbench/engine_chimera.h @@ -38,7 +38,7 @@ #include #include -/** Infomation about the database compile */ +/** Information about the database compile */ struct CompileCHStats { std::string sigs_name; std::string signatures; diff --git a/tools/hsbench/engine_hyperscan.h b/tools/hsbench/engine_hyperscan.h index afbdf098d..3524a88de 100644 --- a/tools/hsbench/engine_hyperscan.h +++ b/tools/hsbench/engine_hyperscan.h @@ -37,7 +37,7 @@ #include #include -/** Infomation about the database compile */ +/** Information about the database compile */ struct CompileHSStats { std::string sigs_name; std::string signatures; diff --git a/tools/hsbench/engine_pcre.h b/tools/hsbench/engine_pcre.h index 9569bef48..f8ab6c956 100644 --- a/tools/hsbench/engine_pcre.h +++ b/tools/hsbench/engine_pcre.h @@ -38,7 +38,7 @@ #include #include -/** Infomation about the database compile */ +/** Information about the database compile */ struct CompilePCREStats { std::string sigs_name; std::string signatures; diff --git a/tools/hscollider/ResultSet.h b/tools/hscollider/ResultSet.h index 067055cae..b8298e488 100644 --- a/tools/hscollider/ResultSet.h +++ b/tools/hscollider/ResultSet.h @@ -163,7 +163,7 @@ class ResultSet { // Dupe matches that we have seen. std::set dupe_matches; - /* Where these results came from (does not take part in comparisions) */ + /* Where these results came from (does not take part in comparisons) */ ResultSource src; }; diff --git a/tools/hscollider/args.cpp b/tools/hscollider/args.cpp index 2eb510e00..9829f5476 100644 --- a/tools/hscollider/args.cpp +++ b/tools/hscollider/args.cpp @@ -114,7 +114,7 @@ void usage(const char *name, const char *error) { printf(" --no-pcre Disable PCRE engine.\n"); printf(" --test-nfa Disable UE2 engine (test NFA against PCRE).\n"); printf(" --abort-on-fail Abort, rather than exit, on failure.\n"); - printf(" --no-signal-handler Do not handle handle signals (to generate " + printf(" --no-signal-handler Do not handle signals (to generate " "backtraces).\n"); printf(" --literal-on Use Hyperscan pure literal matching.\n"); printf("\n"); diff --git a/tools/hscollider/main.cpp b/tools/hscollider/main.cpp index afa6ef5a9..8d2ffc3fa 100644 --- a/tools/hscollider/main.cpp +++ b/tools/hscollider/main.cpp @@ -969,7 +969,7 @@ void runTestUnit(ostream &out, GroundTruth &ground, GraphTruth &graph, debug_stage = STAGE_UNDEFINED; } -/* Used for testing the graph truth agains PCE */ +/* Used for testing the graph truth against PCE */ static void runGroundCompTestUnit(ostream &out, GroundTruth &ground, GraphTruth &graph, TestUnit &unit, TestSummary &summary, diff --git a/tools/hscollider/pcre_util.h b/tools/hscollider/pcre_util.h index 4355579b3..ade79f740 100644 --- a/tools/hscollider/pcre_util.h +++ b/tools/hscollider/pcre_util.h @@ -30,7 +30,7 @@ #define PCRE_UTIL_H /** Translates the given hyperscan flags into pcre flags (where appropriate) - * and other bools (for flags which are not directly translateable). + * and other bools (for flags which are not directly translatable). * * Returns false if an unknown hyperscan flag is encountered. */ diff --git a/unit/gtest/gtest-all.cc b/unit/gtest/gtest-all.cc index a9a03b2e3..4f9ad28b0 100644 --- a/unit/gtest/gtest-all.cc +++ b/unit/gtest/gtest-all.cc @@ -912,9 +912,9 @@ class GTEST_API_ UnitTestImpl { virtual ~UnitTestImpl(); // There are two different ways to register your own TestPartResultReporter. - // You can register your own repoter to listen either only for test results + // You can register your own reporter to listen either only for test results // from the current thread or for results from all threads. - // By default, each per-thread test result repoter just passes a new + // By default, each per-thread test result reporter just passes a new // TestPartResult to the global test result reporter, which registers the // test part result for the currently running test. @@ -1232,7 +1232,7 @@ class GTEST_API_ UnitTestImpl { default_per_thread_test_part_result_reporter_; // Points to (but doesn't own) the global test part result reporter. - TestPartResultReporterInterface* global_test_part_result_repoter_; + TestPartResultReporterInterface* global_test_part_result_reporter_; // Protects read and write access to global_test_part_result_reporter_. internal::Mutex global_test_part_result_reporter_mutex_; @@ -1954,7 +1954,7 @@ bool UnitTestOptions::MatchesFilter( return false; } - // Skips the pattern separater (the ':' character). + // Skips the pattern separator (the ':' character). cur_pattern++; } } @@ -2166,14 +2166,14 @@ void DefaultPerThreadTestPartResultReporter::ReportTestPartResult( TestPartResultReporterInterface* UnitTestImpl::GetGlobalTestPartResultReporter() { internal::MutexLock lock(&global_test_part_result_reporter_mutex_); - return global_test_part_result_repoter_; + return global_test_part_result_reporter_; } // Sets the global test part result reporter. void UnitTestImpl::SetGlobalTestPartResultReporter( TestPartResultReporterInterface* reporter) { internal::MutexLock lock(&global_test_part_result_reporter_mutex_); - global_test_part_result_repoter_ = reporter; + global_test_part_result_reporter_ = reporter; } // Returns the test part result reporter for the current thread. @@ -2945,7 +2945,7 @@ std::string CodePointToUtf8(UInt32 code_point) { return str; } -// The following two functions only make sense if the the system +// The following two functions only make sense if the system // uses UTF-16 for wide string encoding. All supported systems // with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16. @@ -3220,7 +3220,7 @@ void TestResult::RecordProperty(const std::string& xml_element, if (!ValidateTestProperty(xml_element, test_property)) { return; } - internal::MutexLock lock(&test_properites_mutex_); + internal::MutexLock lock(&test_properties_mutex_); const std::vector::iterator property_with_matching_key = std::find_if(test_properties_.begin(), test_properties_.end(), internal::TestPropertyKeyIs(test_property.key())); @@ -5488,7 +5488,7 @@ UnitTestImpl::UnitTestImpl(UnitTest* parent) default_global_test_part_result_reporter_(this), default_per_thread_test_part_result_reporter_(this), #endif // _MSC_VER - global_test_part_result_repoter_( + global_test_part_result_reporter_( &default_global_test_part_result_reporter_), per_thread_test_part_result_reporter_( &default_per_thread_test_part_result_reporter_), @@ -6310,7 +6310,7 @@ static const char kColorEncodedHelpMessage[] = " @G--" GTEST_FLAG_PREFIX_ "list_tests@D\n" " List the names of all tests instead of running them. The name of\n" " TEST(Foo, Bar) is \"Foo.Bar\".\n" -" @G--" GTEST_FLAG_PREFIX_ "filter=@YPOSTIVE_PATTERNS" +" @G--" GTEST_FLAG_PREFIX_ "filter=@YPOSITIVE_PATTERNS" "[@G-@YNEGATIVE_PATTERNS]@D\n" " Run only the tests whose name matches one of the positive patterns but\n" " none of the negative patterns. '?' matches any single character; '*'\n" @@ -9132,7 +9132,7 @@ namespace internal { // Depending on the value of a char (or wchar_t), we print it in one // of three formats: // - as is if it's a printable ASCII (e.g. 'a', '2', ' '), -// - as a hexidecimal escape sequence (e.g. '\x7F'), or +// - as a hexadecimal escape sequence (e.g. '\x7F'), or // - as a special escape sequence (e.g. '\r', '\n'). enum CharFormat { kAsIs, @@ -9236,7 +9236,7 @@ void PrintCharAndCodeTo(Char c, ostream* os) { return; *os << " (" << static_cast(c); - // For more convenience, we print c's code again in hexidecimal, + // For more convenience, we print c's code again in hexadecimal, // unless c was already printed in the form '\x##' or the code is in // [1, 9]. if (format == kHexEscape || (1 <= c && c <= 9)) { diff --git a/unit/gtest/gtest.h b/unit/gtest/gtest.h index 4f3804f70..872a4e949 100644 --- a/unit/gtest/gtest.h +++ b/unit/gtest/gtest.h @@ -8064,7 +8064,7 @@ class NativeArray { // Implements Boolean test assertions such as EXPECT_TRUE. expression can be // either a boolean expression or an AssertionResult. text is a textual -// represenation of expression as it was passed into the EXPECT_TRUE. +// representation of expression as it was passed into the EXPECT_TRUE. #define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ if (const ::testing::AssertionResult gtest_ar_ = \ @@ -9941,7 +9941,7 @@ void UniversalTersePrint(const T& value, ::std::ostream* os) { // NUL-terminated string. template void UniversalPrint(const T& value, ::std::ostream* os) { - // A workarond for the bug in VC++ 7.1 that prevents us from instantiating + // A workaround for the bug in VC++ 7.1 that prevents us from instantiating // UniversalPrinter with T directly. typedef T T1; UniversalPrinter::Print(value, os); @@ -18005,7 +18005,7 @@ class GTEST_API_ TestResult { // Protects mutable state of the property vector and of owned // properties, whose values may be updated. - internal::Mutex test_properites_mutex_; + internal::Mutex test_properties_mutex_; // The vector of TestPartResults std::vector test_part_results_; diff --git a/util/ExpressionParser.rl b/util/ExpressionParser.rl index fec479229..765a95309 100644 --- a/util/ExpressionParser.rl +++ b/util/ExpressionParser.rl @@ -176,7 +176,7 @@ bool HS_CDECL readExpression(const std::string &input, std::string &expr, ( '{' param_spec (',' param_spec)* '}' )? # list of ext params $^{ return false; }; - # Intialize and execute. + # Initialize and execute. write init; write exec; }%%