Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Issue 645793005: [CSS Grid Layout] ASSERTION FAILED: repetitions > 0 (Closed)

Created:
6 years, 2 months ago by svillar
Modified:
6 years, 2 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, dglazkov+blink, ed+blinkwatch_opera.com, rwlbuis, rune+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

[CSS Grid Layout] ASSERTION FAILED: repetitions > 0 If the author specifies an absurdly large number of repetitions it might happen that the double value contained in the CSSParserValue does not fit in a size_t, so it is clamped down to 0 during the type casting. From now on we limit the value of repetitions to kGridMaxTracks (1 million) before casting the double value to a size_t. BUG=425001 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184154

Patch Set 1 #

Total comments: 5

Patch Set 2 : Use clampTo() instead of std::min() #

Total comments: 2

Patch Set 3 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -2 lines) Patch
M Source/core/css/parser/CSSPropertyParser.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/css/parser/CSSPropertyParserTest.cpp View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
svillar
Sending for review
6 years, 2 months ago (2014-10-21 14:57:41 UTC) #2
Julien - ping for review
https://codereview.chromium.org/645793005/diff/1/Source/core/css/parser/CSSPropertyParser.cpp File Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/645793005/diff/1/Source/core/css/parser/CSSPropertyParser.cpp#newcode3582 Source/core/css/parser/CSSPropertyParser.cpp:3582: ASSERT_WITH_SECURITY_IMPLICATION(arguments->valueAt(0)->fValue > 0); I don't have this ASSERT on ...
6 years, 2 months ago (2014-10-21 15:33:12 UTC) #3
svillar
https://codereview.chromium.org/645793005/diff/1/Source/core/css/parser/CSSPropertyParser.cpp File Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/645793005/diff/1/Source/core/css/parser/CSSPropertyParser.cpp#newcode3582 Source/core/css/parser/CSSPropertyParser.cpp:3582: ASSERT_WITH_SECURITY_IMPLICATION(arguments->valueAt(0)->fValue > 0); On 2014/10/21 15:33:12, Julien Chaffraix - ...
6 years, 2 months ago (2014-10-21 15:48:49 UTC) #4
Julien - ping for review
lgtm https://codereview.chromium.org/645793005/diff/1/Source/core/css/parser/CSSPropertyParser.cpp File Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/645793005/diff/1/Source/core/css/parser/CSSPropertyParser.cpp#newcode3582 Source/core/css/parser/CSSPropertyParser.cpp:3582: ASSERT_WITH_SECURITY_IMPLICATION(arguments->valueAt(0)->fValue > 0); On 2014/10/21 15:48:49, svillar wrote: ...
6 years, 2 months ago (2014-10-21 19:22:36 UTC) #5
svillar
https://codereview.chromium.org/645793005/diff/20001/Source/core/css/parser/CSSPropertyParser.cpp File Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/645793005/diff/20001/Source/core/css/parser/CSSPropertyParser.cpp#newcode3582 Source/core/css/parser/CSSPropertyParser.cpp:3582: ASSERT_WITH_SECURITY_IMPLICATION(arguments->valueAt(0)->fValue > 0); On 2014/10/21 19:22:36, Julien Chaffraix - ...
6 years, 2 months ago (2014-10-22 07:02:26 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/645793005/40001
6 years, 2 months ago (2014-10-22 07:06:20 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/30349) linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/82223)
6 years, 2 months ago (2014-10-22 07:19:18 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/645793005/40001
6 years, 2 months ago (2014-10-22 07:24:46 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 184154
6 years, 2 months ago (2014-10-22 08:48:25 UTC) #13
sof
Just noting that CSSPropertyParserTest.GridTrackLimits now takes ~16 secs to run locally; this doubles the overall ...
6 years, 2 months ago (2014-10-23 09:39:11 UTC) #14
svillar
6 years, 2 months ago (2014-10-23 09:44:26 UTC) #15
Message was sent while issue was closed.
On 2014/10/23 09:39:11, sof wrote:
> Just noting that CSSPropertyParserTest.GridTrackLimits now takes ~16 secs to
run
> locally; this doubles the overall running time of non-single-process unit
tests.
> 
> It's a fair bit faster with Oilpan enabled, though.

That's bizarre. In my local machines it takes ~300ms. Granted is slower than
other unit tests, but it's not even close to the figures you're reporting. IMO
there should be something wrong in your setup. Note that we're just adding 4 new
test cases. In my case the test went from ~270ms to ~300ms.

Could you try to profile it and check what's making it so slow?

Powered by Google App Engine
This is Rietveld 408576698