Open Bug 1273105 Opened 8 years ago Updated 2 years ago

<input type=date> with step 2 * 1 * 86400000 takes a long time to calculate EuclidLCM()

Categories

(Core :: MFBT, defect)

defect

Tracking

()

People

(Reporter: jdai, Unassigned)

Details

From Bug #1088761 comment 16:

When using EuclidLCM() handle a big Decimal value "2 * 1 * 86400000", it takes a long time to finish.


Steps to reproduce:
Run web-platform-tests form-validation-reportValidity.html.

Actual results:
Got testcase timeout.

Expected results:
Should be no timeout in any platform.

Stacktrace:
#0  0x000000000040ff6a in blink::Decimal::alignOperands(blink::Decimal const&, blink::Decimal const&) (lhs=..., rhs=...) at /media/john/c6200233-c3c3-4f24-8744-a964b0584bfa/john/workspace/firefox/mfbt/deci
mal/Decimal.cpp:590
#1  0x000000000040f49c in blink::Decimal::operator-(blink::Decimal const&) const (this=0x7fffffff7420, rhs=...) at /media/john/c6200233-c3c3-4f24-8744-a964b0584bfa/john/workspace/firefox/mfbt/decimal/Decim
al.cpp:399
#2  0x00007fffe8567fc0 in mozilla::EuclidGCD<blink::Decimal>(blink::Decimal, blink::Decimal) (aA=..., aB=...) at /media/john/c6200233-c3c3-4f24-8744-a964b0584bfa/john/workspace/firefox/obj-x86_64-pc-linux-
gnu/dist/include/mozilla/MathAlgorithms.h:33
#3  0x00007fffe8560c4b in mozilla::EuclidLCM<blink::Decimal>(blink::Decimal, blink::Decimal) (aA=..., aB=...) at /media/john/c6200233-c3c3-4f24-8744-a964b0584bfa/john/workspace/firefox/obj-x86_64-pc-linux-
gnu/dist/include/mozilla/MathAlgorithms.h:48
#4  0x00007fffe853ab26 in mozilla::dom::HTMLInputElement::GetValidationMessage(nsAString_internal&, nsIConstraintValidation::ValidityStateType) (this=0x7fffc12c6520, aValidationMessage=..., aType=nsIConstr
aintValidation::VALIDITY_STATE_STEP_MISMATCH) at /media/john/c6200233-c3c3-4f24-8744-a964b0584bfa/john/workspace/firefox/dom/html/HTMLInputElement.cpp:7010
#5  0x00007fffe85eb6f0 in nsIConstraintValidation::GetValidationMessage(nsAString_internal&) (this=0x7fffc12c6650, aValidationMessage=...) at /media/john/c6200233-c3c3-4f24-8744-a964b0584bfa/john/workspace
/firefox/dom/html/nsIConstraintValidation.cpp:93
#6  0x00007fffe85265a4 in mozilla::dom::HTMLInputElement::GetValidationMessage(nsAString_internal&) (this=0x7fffc12c6520, aValidationMessage=...) at /media/john/c6200233-c3c3-4f24-8744-a964b0584bfa/john/wo
rkspace/firefox/dom/html/HTMLInputElement.cpp:1068
#7  0x00007fffe8539ef3 in mozilla::dom::HTMLInputElement::GetValidationMessage(nsAString_internal&, mozilla::ErrorResult&) (this=0x7fffc12c6520, aValidationMessage=..., aRv=...) at /media/john/c6200233-c3c
3-4f24-8744-a964b0584bfa/john/workspace/firefox/dom/html/HTMLInputElement.cpp:6827
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.