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

Issue 842053 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: May 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 841991



Sign in to add a comment

mosys: failed to build with llvm next

Project Member Reported by yunlian@chromium.org, May 11 2018

Issue description

With newer llvm,

emerge-daisy mosys

armv7a-cros-linux-gnueabi-clang  -Imosys@sta -I. -I../mosys-1.2.3 -I../mosys-1.2.3/include -I/build/daisy/usr/include/uuid -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -include config.h -std=gnu99 -Wno-address-of-packed-member -Werror -fPIC -MMD -MQ 'mosys@sta/platform_auron_gpio.c.o' -MF 'mosys@sta/platform_auron_gpio.c.o.d' -o 'mosys@sta/platform_auron_gpio.c.o' -c ../mosys-1.2.3/platform/auron/gpio.c
../mosys-1.2.3/platform/auron/gpio.c:73:2: error: array index 96 is past the end of the array (which contains 96 elements) [-Werror,-Warray-bounds]
        platform_gpio_map[num_of_gpio + 1].name = NULL;
        ^                 ~~~~~~~~~~~~~~~
../mosys-1.2.3/platform/auron/gpio.c:51:1: note: array 'platform_gpio_map' declared here
static struct gpio_map platform_gpio_map[num_of_gpio + 1];
^
1 error generated.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/mosys/+/cf972feb47fda704ffb7a18f1046bb1196dfed1a

commit cf972feb47fda704ffb7a18f1046bb1196dfed1a
Author: Yunlian Jiang <yunlian@google.com>
Date: Fri May 11 19:10:50 2018

mosys: fix -Warray-bounds warning.

This fixes an array out of bound warning which is found by newer
LLVM.

BUG= chromium:842053 
TEST=emerge-daisy mosys

Change-Id: I535d7324b0fe325f4f7c598ee0be2be8c8f527aa
Reviewed-on: https://chromium-review.googlesource.com/1054154
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>

[modify] https://crrev.com/cf972feb47fda704ffb7a18f1046bb1196dfed1a/platform/samus/gpio.c
[modify] https://crrev.com/cf972feb47fda704ffb7a18f1046bb1196dfed1a/platform/auron/gpio.c

Status: Verified (was: Untriaged)

Sign in to add a comment