diff options
author | Hiroya Fujinami <[email protected]> | 2024-01-29 23:51:26 +0900 |
---|---|---|
committer | <[email protected]> | 2024-01-29 23:51:26 +0900 |
commit | 3e6e3ca2627b1aa71b17de902cc1b8188246a828 () | |
tree | 82b89752e63bc6c27531fe9083739c6e1a17761a /test/ruby/test_regexp.rb | |
parent | 0d4de0f4b1b9ac90be437bf1bac6851dd1d96fd0 (diff) |
Correctly handle consecutive lookarounds (#9738)
Fix [Bug #20207] Fix [Bug #20212] Handling consecutive lookarounds in init_cache_opcodes is buggy, so it causes invalid memory access reported in [Bug #20207] and [Bug #20212]. This fixes it by using recursive functions to detected lookarounds nesting correctly.
-rw-r--r-- | test/ruby/test_regexp.rb | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -2016,6 +2016,18 @@ class TestRegexp < Test::Unit::TestCase assert(/^(?:.+){2,4}?b|b/.match? "aaaabaa") end def test_linear_time_p assert_send [Regexp, :linear_time?, /a/] assert_send [Regexp, :linear_time?, 'a'] |