]> git.ipfire.org Git - thirdparty/snort3.git/commit
Pull request #3300: JS Normalizer refactoring.
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Tue, 8 Mar 2022 21:06:40 +0000 (21:06 +0000)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Tue, 8 Mar 2022 21:06:40 +0000 (21:06 +0000)
commit496aa0d346044b08e38d27f49f81cb01219c2f8a
tree82604a974eb53741c87e4ff596b2c0f26b2ba977
parent9a91413b8cd7ce8ade9fea064f6dcac829295e88
Pull request #3300: JS Normalizer refactoring.

Merge in SNORT/snort3 from ~OSHUMEIK/snort3:js_perf to master

Squashed commit of the following:

commit 45a6b666b8c8ae9a6e67ed8d098acee76dc7d406
Author: Andrii Serbeniuk <aserbeni@cisco.com>
Date:   Tue Mar 8 15:30:20 2022 +0200

    utils: improve Flex matching patterns

    Try to match as much as possible at a time.

commit 88b1d71905cda27a2231b95e1dfafbe7a91aa1e2
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date:   Sun Mar 6 18:50:56 2022 +0200

    utils: combine ignore list with normalization map

    An ID name is looked once in a combined map (normalized names and ignored names).

commit af84510fd2527b9b20cd3a3fd6e41e6651c0d436
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date:   Sun Mar 6 10:59:00 2022 +0200

    utils: wrap unordered set with a fast lookup table

commit 23a81bb9f19c51f9f3c57fc39afb5b045622d392
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date:   Sat Mar 5 22:03:43 2022 +0200

    utils: check more likely branches at first

commit a043edabcee24c5a0f167939581ab6202b3e491b
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date:   Sat Mar 5 21:09:48 2022 +0200

    utils: pre-compute ID normalized names

commit c1c644e47b8a7f0b04126fa4a6e7e68ca2e283b0
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date:   Fri Mar 4 20:57:24 2022 +0200

    utils: refactor the alias lookup

    One search in the map is performed per alias lookup.
    Loops removed.

    The scope_contains() test function removed, it is redundant.
src/utils/js_identifier_ctx.cc
src/utils/js_identifier_ctx.h
src/utils/js_tokenizer.l
src/utils/test/js_identifier_ctx_test.cc
src/utils/test/js_normalizer_test.cc