New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 674765 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 673067
issue 674264



Sign in to add a comment

Build error for ARM Linux target in headless/app/headless_shell.cc

Reported by simon.ho...@arm.com, Dec 16 2016

Issue description

https://codereview.chromium.org/2577483002 introduces a compile error for ARM about comparing an unsigned char with EOF (which is -1).

This kills the build.

fgetc()'s result should be captured in an int, not a char.  I have a patch but I can't get it past presubmit because:

    ** Presubmit ERRORS **
    These files spam the console log with LOG(INFO):
      headless/app/headless_shell.cc

 
Cc: skyos...@chromium.org altimin@chromium.org alexclarke@chromium.org
Status: Started (was: Unconfirmed)

Comment 2 by simon.ho...@arm.com, Dec 16 2016

Blocking: 673067
Cc: thakis@chromium.org

Comment 4 by simon.ho...@arm.com, Dec 16 2016

0001-Use-int-for-fgetc-result-in-headless_shell.patch
1.2 KB Download
Blocking: 674264

Comment 6 by thakis@chromium.org, Dec 16 2016

You can pass `--bypass-hooks` to `git cl upload` to skip presubmits, and/or add `NOPRESUBMIT=true` to your cl description to make the bots skip it.

But that file should probably be added to the spam whitelist in PRESUBMIT.py

Comment 7 by simon.ho...@arm.com, Dec 16 2016

Aha!  It looks like I copy-pasted some kind of unicode hypen from IRC when I got the same advice there.

Done.

https://codereview.chromium.org/2579773003
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b43d478991126401b0a03ef49438fcdcda961938

commit b43d478991126401b0a03ef49438fcdcda961938
Author: simon.hosie <simon.hosie@arm.com>
Date: Mon Dec 19 15:50:24 2016

Use int for fgetc() result in headless_shell

Fixes compilation failure introduced by c3ac4fc0.

fgetc() returns its result as an _unsigned_ char and defines EOF as -1, and
gives the result as an int.  If char is unsigned it's impossible for EOF to
match, and this results in a compilation error.  If char is signed then
potentially valid input could match EOF.

BUG= 674765 
R=altimin@chromium.org, skyostil@chromium.org

Change-Id: I979a8401e8c33d8983e7d1bee96b81bc555863ec
Review-Url: https://codereview.chromium.org/2579773003
Cr-Commit-Position: refs/heads/master@{#439479}

[modify] https://crrev.com/b43d478991126401b0a03ef49438fcdcda961938/headless/app/headless_shell.cc

Status: Fixed (was: Started)

Sign in to add a comment