Branch: refs/heads/topic/robin/gh-2131-capture-check
Home:
https://github.com/zeek/spicy
Commit: 667c889444053263b6c6e21f65b7f1c4289818a7
https://github.com/zeek/spicy/commit/667c889444053263b6c6e21f65b7f1c4289818a7
Author: Robin Sommer <
ro...@corelight.com>
Date: 2026-04-01 (Wed, 01 Apr 2026)
Changed paths:
M 3rdparty/justrx
Log Message:
-----------
Bump justrx to pull in fix for memory leak.
Commit: 8cd9b909f77afd886d489de6b54ab3272fe028ef
https://github.com/zeek/spicy/commit/8cd9b909f77afd886d489de6b54ab3272fe028ef
Author: Robin Sommer <
ro...@corelight.com>
Date: 2026-04-01 (Wed, 01 Apr 2026)
Changed paths:
M hilti/runtime/include/types/regexp.h
M hilti/runtime/src/tests/regexp.cc
M hilti/runtime/src/types/regexp.cc
Log Message:
-----------
Add a couple of static analysis methods to regular expression patterns.
These allow to (1) validate a regular expression and (2) determine its
number of capture groups. They work by temporarily compiling the
patterns.
Also includes a tiny cleanup removing an unused function parameter.
Commit: cf62add0e222d29408fadabd03b3da52882f022a
https://github.com/zeek/spicy/commit/cf62add0e222d29408fadabd03b3da52882f022a
Author: Robin Sommer <
ro...@corelight.com>
Date: 2026-04-01 (Wed, 01 Apr 2026)
Changed paths:
M hilti/toolchain/src/compiler/validator.cc
M spicy/toolchain/src/compiler/validator.cc
A tests/Baseline/hilti.types.regexp.ctor-fail/output
A tests/Baseline/spicy.types.regexp.capture-groups-fail/output
R tests/Baseline/spicy.types.regexp.capture-without-regexp/output
R tests/Baseline/spicy.types.regexp.parse-ctor-captures-no-sub/output
A tests/hilti/types/regexp/ctor-fail.hlt
M tests/hilti/types/regexp/match-repeats.hlt
A tests/spicy/types/regexp/capture-groups-fail.spicy
R tests/spicy/types/regexp/capture-without-regexp.spicy
R tests/spicy/types/regexp/parse-ctor-captures-no-sub.spicy
Log Message:
-----------
Add compile-time validation of regular expressions.
So far we would catch pattern errors only at runtime. Now we report
the following at compile time if it can be statically determined:
- Patterns that don't compile (e.g., due to syntax errors)
- Use of `$N` referring to a capture group that exceeds the number a pattern defines.
- Use of `$N' with a regular expression specifying multiple patterns
for parallel matching (in which case group numbers are ill-defined).
- Use of `$N' with a `&nosub` field.
Closes #2131.
Compare:
https://github.com/zeek/spicy/compare/296168e68e27...cf62add0e222
To unsubscribe from these emails, change your notification settings at
https://github.com/zeek/spicy/settings/notifications