Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@busybox.net
To: buildroot@uclibc.org
Subject: [Buildroot] [Bug 15799] New: freescale_imx8mmevk_defconfig, freescale_imx8mnevk_defconfig, freescale_imx8mpevk_defconfig, freescale_imx8mqevk_defconfig: error: array subscript 0 is outside array bounds of 'uint32_t[0]'
Date: Sat, 23 Sep 2023 22:45:31 +0000	[thread overview]
Message-ID: <bug-15799-163@https.bugs.busybox.net/> (raw)

https://bugs.busybox.net/show_bug.cgi?id=15799

            Bug ID: 15799
           Summary: freescale_imx8mmevk_defconfig,
                    freescale_imx8mnevk_defconfig,
                    freescale_imx8mpevk_defconfig,
                    freescale_imx8mqevk_defconfig: error: array subscript
                    0 is outside array bounds of 'uint32_t[0]'
           Product: buildroot
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned@buildroot.uclibc.org
          Reporter: jbglaw@lug-owl.de
                CC: buildroot@uclibc.org
  Target Milestone: ---

For some freescale defconfigs (as of ab4f3fafaa839593b3efd9ea12c8ee5d9340cdeb),
we run into array bounds warnings (-> errors) in arm-trusted-firmware-custom:

[build 2023-09-23 17:51:47]   CC      plat/imx/imx8m/hab.c
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c: In function
'imx_hab_handler':
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:65:57: error: array subscript
0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'}
[-Werror=array-bounds]
[build 2023-09-23 17:51:47]    65 | #define HAB_RVT_CHECK_TARGET_ARM64     
((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x18))
[build 2023-09-23 17:51:47]       |                                            
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:76:59: note: in expansion of
macro 'HAB_RVT_CHECK_TARGET_ARM64'
[build 2023-09-23 17:51:47]    76 | #define hab_rvt_check_target_p
((hab_rvt_check_target_t *)HAB_RVT_CHECK_TARGET_ARM64)
[build 2023-09-23 17:51:47]       |                                            
              ^~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:114:40: note: in expansion of
macro 'hab_rvt_check_target_p'
[build 2023-09-23 17:51:47]   114 |                 hab_rvt_check_target =
hab_rvt_check_target_p;
[build 2023-09-23 17:51:47]       |                                       
^~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:69:57: error: array subscript
0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'}
[-Werror=array-bounds]
[build 2023-09-23 17:51:47]    69 | #define HAB_RVT_FAILSAFE_ARM64         
((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x50))
[build 2023-09-23 17:51:47]       |                                            
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:77:51: note: in expansion of
macro 'HAB_RVT_FAILSAFE_ARM64'
[build 2023-09-23 17:51:47]    77 | #define hab_rvt_failsafe_p
((hab_rvt_failsafe_t *)HAB_RVT_FAILSAFE_ARM64)
[build 2023-09-23 17:51:47]       |                                            
      ^~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:110:36: note: in expansion of
macro 'hab_rvt_failsafe_p'
[build 2023-09-23 17:51:47]   110 |                 hab_rvt_failsafe =
hab_rvt_failsafe_p;
[build 2023-09-23 17:51:47]       |                                   
^~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:68:65: error: array subscript
0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'}
[-Werror=array-bounds]
[build 2023-09-23 17:51:47]    68 | #define HAB_RVT_REPORT_STATUS_ARM64        
    ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x48))
[build 2023-09-23 17:51:47]       |                                            
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:75:61: note: in expansion of
macro 'HAB_RVT_REPORT_STATUS_ARM64'
[build 2023-09-23 17:51:47]    75 | #define hab_rvt_report_status_p
((hab_rvt_report_status_t *)HAB_RVT_REPORT_STATUS_ARM64)
[build 2023-09-23 17:51:47]       |                                            
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:107:41: note: in expansion of
macro 'hab_rvt_report_status_p'
[build 2023-09-23 17:51:47]   107 |                 hab_rvt_report_status =
hab_rvt_report_status_p;
[build 2023-09-23 17:51:47]       |                                        
^~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:67:65: error: array subscript
0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'}
[-Werror=array-bounds]
[build 2023-09-23 17:51:47]    67 | #define HAB_RVT_REPORT_EVENT_ARM64         
    ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x40))
[build 2023-09-23 17:51:47]       |                                            
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:74:59: note: in expansion of
macro 'HAB_RVT_REPORT_EVENT_ARM64'
[build 2023-09-23 17:51:47]    74 | #define hab_rvt_report_event_p
((hab_rvt_report_event_t *)HAB_RVT_REPORT_EVENT_ARM64)
[build 2023-09-23 17:51:47]       |                                            
              ^~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:104:40: note: in expansion of
macro 'hab_rvt_report_event_p'
[build 2023-09-23 17:51:47]   104 |                 hab_rvt_report_event =
hab_rvt_report_event_p;
[build 2023-09-23 17:51:47]       |                                       
^~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:64:65: error: array subscript
0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'}
[-Werror=array-bounds]
[build 2023-09-23 17:51:47]    64 | #define HAB_RVT_EXIT_ARM64                 
    ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x10))
[build 2023-09-23 17:51:47]       |                                            
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:73:43: note: in expansion of
macro 'HAB_RVT_EXIT_ARM64'
[build 2023-09-23 17:51:47]    73 | #define hab_rvt_exit_p ((hab_rvt_exit_t
*)HAB_RVT_EXIT_ARM64)
[build 2023-09-23 17:51:47]       |                                          
^~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:101:32: note: in expansion of
macro 'hab_rvt_exit_p'
[build 2023-09-23 17:51:47]   101 |                 hab_rvt_exit =
hab_rvt_exit_p;
[build 2023-09-23 17:51:47]       |                               
^~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:63:65: error: array subscript
0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'}
[-Werror=array-bounds]
[build 2023-09-23 17:51:47]    63 | #define HAB_RVT_ENTRY_ARM64                
    ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x08))
[build 2023-09-23 17:51:47]       |                                            
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:72:45: note: in expansion of
macro 'HAB_RVT_ENTRY_ARM64'
[build 2023-09-23 17:51:47]    72 | #define hab_rvt_entry_p ((hab_rvt_entry_t
*)HAB_RVT_ENTRY_ARM64)
[build 2023-09-23 17:51:47]       |                                            
^~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:98:33: note: in expansion of
macro 'hab_rvt_entry_p'
[build 2023-09-23 17:51:47]    98 |                 hab_rvt_entry =
hab_rvt_entry_p;
[build 2023-09-23 17:51:47]       |                                
^~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:66:65: error: array subscript
0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'}
[-Werror=array-bounds]
[build 2023-09-23 17:51:47]    66 | #define HAB_RVT_AUTHENTICATE_IMAGE_ARM64   
    ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x20))
[build 2023-09-23 17:51:47]       |                                            
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:71:71: note: in expansion of
macro 'HAB_RVT_AUTHENTICATE_IMAGE_ARM64'
[build 2023-09-23 17:51:47]    71 | #define hab_rvt_authenticate_image_p
((hab_rvt_authenticate_image_t *)HAB_RVT_AUTHENTICATE_IMAGE_ARM64)
[build 2023-09-23 17:51:47]       |                                            
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] plat/imx/imx8m/hab.c:95:46: note: in expansion of
macro 'hab_rvt_authenticate_image_p'
[build 2023-09-23 17:51:47]    95 |                 hab_rvt_authenticate_image
= hab_rvt_authenticate_image_p;
[build 2023-09-23 17:51:47]       |                                            
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build 2023-09-23 17:51:47] cc1: all warnings being treated as errors
[build 2023-09-23 17:51:47] make[1]: *** [Makefile:1104:
/var/lib/laminar/run/buildroot-freescale_imx8mnevk_defconfig/6/buildroot/output/build/arm-trusted-firmware-custom/build/imx8mn/release/bl31/hab.o]
Error 1
[build 2023-09-23 17:51:47] make[1]: Leaving directory
'/var/lib/laminar/run/buildroot-freescale_imx8mnevk_defconfig/6/buildroot/output/build/arm-trusted-firmware-custom'
[build 2023-09-23 17:51:47] make: *** [package/pkg-generic.mk:293:
/var/lib/laminar/run/buildroot-freescale_imx8mnevk_defconfig/6/buildroot/output/build/arm-trusted-firmware-custom/.stamp_built]
Error 2

(Build logs are at
http://toolchain.lug-owl.de/laminar/jobs/buildroot-freescale_imx8mmevk_defconfig/6,
http://toolchain.lug-owl.de/laminar/jobs/buildroot-freescale_imx8mnevk_defconfig/6,
http://toolchain.lug-owl.de/laminar/jobs/buildroot-freescale_imx8mpevk_defconfig/6
and
http://toolchain.lug-owl.de/laminar/jobs/buildroot-freescale_imx8mqevk_defconfig/6)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2023-09-23 22:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-23 22:45 bugzilla [this message]
2023-09-24 18:08 ` [Buildroot] [Bug 15799] freescale_imx8mmevk_defconfig, freescale_imx8mnevk_defconfig, freescale_imx8mpevk_defconfig, freescale_imx8mqevk_defconfig: error: array subscript 0 is outside array bounds of 'uint32_t[0]' bugzilla
2024-06-15 15:12 ` bugzilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15799-163@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@uclibc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox