https://codereview.appspot.com/231370043/diff/1/lily/beaming-pattern.cc File lily/beaming-pattern.cc (right): https://codereview.appspot.com/231370043/diff/1/lily/beaming-pattern.cc#newcode170 lily/beaming-pattern.cc:170: int start_dur = intlog2(static_cast<int>(infos_[i+1].start_moment_.main_part_.den())); On 2015/05/05 00:11:06, dak wrote: ...
10 years, 4 months ago
(2015-05-05 00:30:05 UTC)
#3
https://codereview.appspot.com/231370043/diff/1/lily/beaming-pattern.cc
File lily/beaming-pattern.cc (right):
https://codereview.appspot.com/231370043/diff/1/lily/beaming-pattern.cc#newco...
lily/beaming-pattern.cc:170: int start_dur =
intlog2(static_cast<int>(infos_[i+1].start_moment_.main_part_.den()));
On 2015/05/05 00:11:06, dak wrote:
> intlog2(0) aborts the program. So if den is some large power of 2 that
> converted into int is 0, one can trigger an abort here.
>
> In other words: GCC might have a point here. I don't know how likely the code
> is to fall apart for other kinds of overflow though.
OK, I'll revert this one and leave it for someone more familiar with the code.
Issue 231370043: Issue 4369: silence warning in page-breaking.cc
(Closed)
Created 10 years, 4 months ago by Dan Eble
Modified 10 years, 4 months ago
Reviewers: dak
Base URL:
Comments: 3