ladybird/Libraries/LibRegex
Andreas Kling c12647fc37 LibRegex: Clamp braced quantifier bounds to 2^31 - 1
Browsers clamp braced quantifier bounds above 2^31 - 1 before
checking whether {min,max} is in order. The parser still kept values
up to u32::MAX, so patterns like {2147483648,2147483647} were
rejected even though both bounds should collapse to the same limit.

Clamp parsed braced quantifier bounds to 2^31 - 1 as they are read.
This keeps the existing acceptance of huge exact and open-ended
quantifiers and makes the constructor and regex literal paths agree
with other engines on the out-of-order edge cases.

The RegExp runtime and syntax tests now cover accepted huge
quantifiers, clamped order validation, and huge literal forms. The
reported constructor and literal cases also match other engines.
2026-03-31 15:59:04 +02:00
..
Rust LibRegex: Clamp braced quantifier bounds to 2^31 - 1 2026-03-31 15:59:04 +02:00
CMakeLists.txt Meta: Make Rust FFI headers reproducible 2026-03-31 15:59:04 +02:00
ECMAScriptRegex.cpp LibRegex: Respect V8 astral literal lastIndex behavior 2026-03-27 17:32:19 +01:00
ECMAScriptRegex.h LibRegex: Respect V8 astral literal lastIndex behavior 2026-03-27 17:32:19 +01:00
RustRegex.cpp LibRegex: Respect V8 astral literal lastIndex behavior 2026-03-27 17:32:19 +01:00
RustRegex.h LibRegex: Respect V8 astral literal lastIndex behavior 2026-03-27 17:32:19 +01:00