-
-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICU-22848 Add test for rbbi rule builder failure. #3089
base: main
Are you sure you want to change the base?
ICU-22848 Add test for rbbi rule builder failure. #3089
Conversation
@aheninger could you take a look at the test case I added. It is now hang. I think it is super slow |
Looks like the state table builder is running in exponential time on the number of trailing dots in the test pattern, ".*X..................;" This is deep in the guts of the dragon book state table construction algorithm. I doubt there is an easy fix - the algorithm is tricky and hard to fully understand. I recommend just leaving this as a known issue. It's not a problem in actual real break rules. |
1a726c9
to
e533e2b
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Add test to show very slow creation
e533e2b
to
7644adc
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
@@ -6133,6 +6134,13 @@ void RBBITest::TestBug22636() { | |||
assertEquals(WHERE, ec, U_ZERO_ERROR); | |||
} | |||
|
|||
void RBBITest::TestBug22848() { | |||
if (quick || logKnownIssue("ICU-22848", "Very slow case")) { return; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend
- reduce the number of dots in the pattern to the minimum that causes the failure (copy from bug report comment). This will dramatically speed up the test.
- add an AssertSuccess after creating the bi. So the test will actually fail, and not just hang.
- re-title the PR to something like "Add test for rbbi rule builder failure."
The test should fail -- when the state table max size is exceeded the ec will return a failure.
Checklist