|
|
Chromium Code Reviews|
Created:
5 years, 6 months ago by kochi Modified:
5 years, 6 months ago CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, groby-ooo-7-16, rwlbuis, sof Base URL:
svn://svn.chromium.org/blink/trunk Target Ref:
refs/remotes/origin/master Project:
blink Visibility:
Public. |
DescriptionUnuse bitfields for ElementRareData::m_proxyCount.
This bitfields usage was introduced at
https://codereview.chromium.org/1064123002/
but now m_tabStop went away, it no longer has to be
a bitfield.
In addition, this caused Dr.Memory to detect
false positive as 'uninitialized read'.
BUG=498519
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196989
Patch Set 1 #Patch Set 2 : add comment #Messages
Total messages: 18 (5 generated)
kochi@chromium.org changed reviewers: + sadrul@chromium.org
The CQ bit was checked by kochi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1174823004/1
Sadrul, Could you take a look? I think it should never be a problem to extend the field to use full 16bits, it doesn't change the size of ElementRareData.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
sadrul@chromium.org changed reviewers: + esprehn@chromium.org
+esprehn@ Looks good. Although maybe add a comment to make sure newer fields share bitfields if possible, and that it is okay to cut down the proxy-count size?
On 2015/06/10 16:15:49, sadrul wrote: > +esprehn@ > > Looks good. Although maybe add a comment to make sure newer fields share > bitfields if possible, and that it is okay to cut down the proxy-count size? How many bits can be cut down? I assume 10 is big enough for proxy counts, but could it be smaller?
On 2015/06/10 at 23:09:39, kochi wrote: > On 2015/06/10 16:15:49, sadrul wrote: > > +esprehn@ > > > > Looks good. Although maybe add a comment to make sure newer fields share > > bitfields if possible, and that it is okay to cut down the proxy-count size? > > How many bits can be cut down? > I assume 10 is big enough for proxy counts, but could it be smaller? That's 1024, it's a good question. We probably need to make the proxies fail on creation if you hit that limit. I'm not sure what a reasonable number of proxies is for an app, I bet it's a lot smaller than 1024 though.
On 2015/06/11 00:34:11, esprehn wrote: > On 2015/06/10 at 23:09:39, kochi wrote: > > On 2015/06/10 16:15:49, sadrul wrote: > > > +esprehn@ > > > > > > Looks good. Although maybe add a comment to make sure newer fields share > > > bitfields if possible, and that it is okay to cut down the proxy-count size? > > > > How many bits can be cut down? > > I assume 10 is big enough for proxy counts, but could it be smaller? > > That's 1024, it's a good question. We probably need to make the proxies fail on > creation if you hit that limit. I'm not sure what a reasonable number of proxies > is for an app, I bet it's a lot smaller than 1024 though. Okay, I think if we change it to a bitfield like m_proxyCount : 10; then the compiler can take care of the overflow not to corrupt the neighbour bit, but then once overflow happens m_proxyCount suddenly goes 0, and user may see some funny bugs that is hard to track down. Anyway, 10bits was the number that m_proxyCounts used to be, so the potential doesn't change. Does the added comment look good?
Ping?
lgtm
This really seems like a bug in Dr. Memory though, having a bitfield and the compiler inserting padding shouldn't generate an error.
The CQ bit was checked by kochi@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1174823004/20001
On 2015/06/12 01:05:59, esprehn wrote: > This really seems like a bug in Dr. Memory though, having a bitfield and the > compiler inserting padding shouldn't generate an error. FYI filed a bug there: https://github.com/DynamoRIO/drmemory/issues/1731
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=196989 |
