Skip to contentSkip to conversation

array subscript is above array bounds warnings with gcc4.3

DISCUSSION Gabriel C 2 participants 3 messages Apr 4, 2008

Subsystems (3)
lore
Share & tools
lore

Gabriel C

author
#0 lore raw

Hi,

I noticed these warning on my randconfig logs of some builds :

..

drivers/usb/core/hcd.c: In function 'usb_hcd_poll_rh_status':
include/asm/string_32.h:65: warning: array subscript is above array bounds

net/netfilter/nf_conntrack_proto_sctp.c: In function 'sctp_packet':
net/netfilter/nf_conntrack_proto_sctp.c:374: warning: array subscript is above array bounds

drivers/acpi/tables/tbfadt.c: In function 'acpi_tb_create_local_fadt':
include/asm/string_32.h:65: warning: array subscript is above array bounds

...

Regards,

Gabriel

#1 lore raw
Quoted 9 lines · Gabriel C

Hi,

I noticed these warning on my randconfig logs of some builds :

..

drivers/usb/core/hcd.c: In function 'usb_hcd_poll_rh_status':
include/asm/string_32.h:65: warning: array subscript is above array bounds

Quoted 7 lines

net/netfilter/nf_conntrack_proto_sctp.c: In function 'sctp_packet':
net/netfilter/nf_conntrack_proto_sctp.c:374: warning: array subscript is above array bounds

drivers/acpi/tables/tbfadt.c: In function 'acpi_tb_create_local_fadt':
include/asm/string_32.h:65: warning: array subscript is above array bounds

...

Sounds like a known and already fixed bug in gcc.

Can you confirm that they go away when you build your compiler from the head of the gcc 4.3 SVN branch?

Quoted 3 lines

Regards,

Gabriel

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
author
#2 lore raw
Quoted 16 lines · Adrian Bunk
Quoted 15 lines · Gabriel C

Hi,

I noticed these warning on my randconfig logs of some builds :

..

drivers/usb/core/hcd.c: In function 'usb_hcd_poll_rh_status':
include/asm/string_32.h:65: warning: array subscript is above array bounds

net/netfilter/nf_conntrack_proto_sctp.c: In function 'sctp_packet':
net/netfilter/nf_conntrack_proto_sctp.c:374: warning: array subscript is above array bounds

drivers/acpi/tables/tbfadt.c: In function 'acpi_tb_create_local_fadt':
include/asm/string_32.h:65: warning: array subscript is above array bounds

Quoted 7 lines
Quoted 1 line

...

Sounds like a known and already fixed bug in gcc.

Can you confirm that they go away when you build your compiler from the head of the gcc 4.3 SVN branch?

I cannot do that right now but I'll build SVN 4.3 tomorrow and report back.

Gabriel