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

Issue 1638323002: Filx complier issue [-Werror, -Wvla] (Closed)

Created:
4 years, 11 months ago by yujieqin
Modified:
4 years, 10 months ago
Reviewers:
msarett, scroggo, dogben, mtklein
CC:
adaubert, ebrauer
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 6

Patch Set 2 : Put stuff on the heap unconditionally #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/codec/SkRawCodec.cpp View 1 1 chunk +1 line, -1 line 4 comments Download

Messages

Total messages: 24 (5 generated)
yujieqin
4 years, 11 months ago (2016-01-27 14:49:15 UTC) #4
msarett
https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp#newcode409 src/codec/SkRawCodec.cpp:409: static const int kStackBytes = 640 * 1024; // ...
4 years, 11 months ago (2016-01-27 14:51:05 UTC) #5
yujieqin
https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp#newcode409 src/codec/SkRawCodec.cpp:409: static const int kStackBytes = 640 * 1024; // ...
4 years, 11 months ago (2016-01-27 14:53:00 UTC) #6
mtklein
https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp#newcode409 src/codec/SkRawCodec.cpp:409: static const int kStackBytes = 640 * 1024; // ...
4 years, 11 months ago (2016-01-27 14:53:32 UTC) #7
yujieqin
https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp#newcode409 src/codec/SkRawCodec.cpp:409: static const int kStackBytes = 640 * 1024; // ...
4 years, 11 months ago (2016-01-27 14:57:53 UTC) #8
msarett
https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp#newcode409 src/codec/SkRawCodec.cpp:409: static const int kStackBytes = 640 * 1024; // ...
4 years, 11 months ago (2016-01-27 15:02:14 UTC) #9
yujieqin
https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/1/src/codec/SkRawCodec.cpp#newcode409 src/codec/SkRawCodec.cpp:409: static const int kStackBytes = 640 * 1024; // ...
4 years, 11 months ago (2016-01-27 15:16:24 UTC) #10
msarett
lgtm
4 years, 11 months ago (2016-01-27 15:35:38 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1638323002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1638323002/20001
4 years, 11 months ago (2016-01-27 15:43:41 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/24716be1d1e6d7fba6ee8604823ce326fd69be1e
4 years, 11 months ago (2016-01-27 15:59:03 UTC) #15
dogben
https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp#newcode418 src/codec/SkRawCodec.cpp:418: buffer.fRowStep = sizeof(srcRow); Does this really work?
4 years, 10 months ago (2016-01-29 19:36:08 UTC) #16
mtklein
https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp#newcode418 src/codec/SkRawCodec.cpp:418: buffer.fRowStep = sizeof(srcRow); On 2016/01/29 19:36:08, Ben Wagner wrote: ...
4 years, 10 months ago (2016-01-29 19:47:48 UTC) #17
scroggo
https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp#newcode418 src/codec/SkRawCodec.cpp:418: buffer.fRowStep = sizeof(srcRow); On 2016/01/29 19:47:48, mtklein wrote: > ...
4 years, 10 months ago (2016-01-29 20:44:29 UTC) #18
scroggo
https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp File src/codec/SkRawCodec.cpp (right): https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp#newcode418 src/codec/SkRawCodec.cpp:418: buffer.fRowStep = sizeof(srcRow); On 2016/01/29 20:44:29, scroggo wrote: > ...
4 years, 10 months ago (2016-01-29 21:01:30 UTC) #19
mtklein
On 2016/01/29 21:01:30, scroggo wrote: > https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp > File src/codec/SkRawCodec.cpp (right): > > https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp#newcode418 > ...
4 years, 10 months ago (2016-01-29 21:04:53 UTC) #20
scroggo
On 2016/01/29 21:04:53, mtklein wrote: > On 2016/01/29 21:01:30, scroggo wrote: > > https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp > ...
4 years, 10 months ago (2016-01-29 21:13:24 UTC) #21
mtklein
On 2016/01/29 21:13:24, scroggo wrote: > On 2016/01/29 21:04:53, mtklein wrote: > > On 2016/01/29 ...
4 years, 10 months ago (2016-01-29 21:20:05 UTC) #22
scroggo
On 2016/01/29 21:20:05, mtklein wrote: > On 2016/01/29 21:13:24, scroggo wrote: > > On 2016/01/29 ...
4 years, 10 months ago (2016-01-29 21:32:42 UTC) #23
yujieqin
4 years, 10 months ago (2016-02-01 08:54:14 UTC) #24
Message was sent while issue was closed.
On 2016/01/29 21:32:42, scroggo wrote:
> On 2016/01/29 21:20:05, mtklein wrote:
> > On 2016/01/29 21:13:24, scroggo wrote:
> > > On 2016/01/29 21:04:53, mtklein wrote:
> > > > On 2016/01/29 21:01:30, scroggo wrote:
> > > > >
> > >
> https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cpp
> > > > > File src/codec/SkRawCodec.cpp (right):
> > > > > 
> > > > >
> > > >
> > >
> >
>
https://codereview.chromium.org/1638323002/diff/20001/src/codec/SkRawCodec.cp...
> > > > > src/codec/SkRawCodec.cpp:418: buffer.fRowStep = sizeof(srcRow);
> > > > > On 2016/01/29 20:44:29, scroggo wrote:
> > > > > > On 2016/01/29 19:47:48, mtklein wrote:
> > > > > > > On 2016/01/29 19:36:08, Ben Wagner wrote:
> > > > > > > > Does this really work?
> > > > > > > 
> > > > > > > Nope, it's quite wrong.  If the old VLA code was correct, this
> should
> > > now
> > > > > read
> > > > > > > width*3.
> > > > > > 
> > > > > > Agreed. Is someone already fixing this?
> > > > > 
> > > > > I've posted a fix at crrev.com/1643373002.
> > > > > 
> > > > > How did it work before though? Gold looks to have some valid results,
> when
> > > it
> > > > > should never be right.
> > > > 
> > > > When using a VLA, sizeof() does magically work.
> > > > 
> > > > uint8_t row[width*3];
> > > > ....
> > > > int x = sizeof(row);
> > > > gives you x = width*3.
> > > > 
> > > > It's not, however, legal C++.  It is legal C.
> > > 
> > > But I mean the code that landed two days ago: 
> > > 
> > > SkAutoTMalloc<uint8_t> srcRow(width * 3);
> > > int x = sizeof(srcRow);
> > > 
> > > Or was this not working and the results we see from gold were from before
> > this?
> > 
> > Must be buffer.fRowStep doesn't matter?
> > Seems plausible, as we're working on one row at a time anyway right?
> 
> Haha, yep, that makes sense.

Sorry for late, I was OoO in Friday. Thanks for the help to fix the issue. :)

Powered by Google App Engine
This is Rietveld 408576698