Commit 3b09573d authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[regexp] Remove unreliable test RegExpInterruptAndReenterIrregexp

We can't properly guarantee that the interrupt is served from inside
the irregexp engine (it could happen before or after). Without that
guarantee, the test is prone to flaking. It's not very useful in
general, since it essentially only tests that the
CHECK(!regexp_stack_->is_in_use()) in regexp-stack.cc exists.

The real fix is to support reentrancy.

Bug: v8:11435,v8:11382
Change-Id: I0a8c3313dd9285ac0c84fef867196dede4785ebb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752159
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73362}
parent 5ddbc33b
......@@ -39,7 +39,6 @@
# These tests are expected to hit a CHECK (i.e. a FAIL result actually means
# the test passed).
'test-api/RegExpInterruptAndReenterIrregexp': [FAIL, CRASH],
'test-verifiers/Fail*': [FAIL, CRASH],
# This test always fails. It tests that LiveEdit causes abort when turned off.
......
......@@ -21423,13 +21423,6 @@ class RegExpInterruptTest {
string->MakeExternal(&two_byte_string_resource);
}
static void ReenterIrregexp(v8::Isolate* isolate, void* data) {
v8::HandleScope scope(isolate);
v8::TryCatch try_catch(isolate);
// Irregexp is not reentrant. This should crash.
CompileRun("/((a*)*)*b/.exec('aaaaab')");
}
private:
static void SignalSemaphore(v8::Isolate* isolate, void* data) {
reinterpret_cast<RegExpInterruptTest*>(data)->sem_.Signal();
......@@ -21556,21 +21549,6 @@ TEST(RegExpInterruptAndMakeSubjectTwoByteExternal) {
test.RunTest(RegExpInterruptTest::MakeSubjectTwoByteExternal);
}
TEST(RegExpInterruptAndReenterIrregexp) {
// We only check in the runtime entry to irregexp, so make sure we don't hit
// an interpreter.
i::FLAG_regexp_tier_up_ticks = 0;
i::FLAG_regexp_interpret_all = false;
i::FLAG_enable_experimental_regexp_engine = false;
// We want to be stuck in regexp execution, so no fallback to linear-time
// engine.
// TODO(mbid,v8:10765): Find a way to test interrupt support of the
// experimental engine.
i::FLAG_enable_experimental_regexp_engine_on_excessive_backtracks = false;
RegExpInterruptTest test;
test.RunTest(RegExpInterruptTest::ReenterIrregexp);
}
class RequestInterruptTestBase {
public:
RequestInterruptTestBase()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment