[SERVER-2883] gcc reports "array subscript is above array bounds" in stringToOid Created: 01/Apr/11 Updated: 05/Apr/12 Resolved: 27/Jan/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Trevor Robinson | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
gcc 4.5.2 on ubuntu natty armel, gcc 4.4.5 on ubuntu maverick armel |
||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
I get the following errors building from 1.8.1-rc0 or trunk: g++ -o db/json.o -c -Wnon-virtual-dtor -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -fno-builtin-memcmp -O3 -D_SCONS -DMONGO_EXPOSE_MACROS -DXULRUNNER -DOLDJS -DXP_UNIX -I/usr/include/nspr -I/usr/include/xulrunner-2.0/stable -I/usr/include/xulrunner-2.0/unstable -I/usr/include/xulrunner-2.0 -I. -I/usr/local/home/trobinson/dev/v8/include db/json.cpp This may be due to GCC bug 47418: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47418 The error can be fixed by editing bson/oid.h and moving unsigned char data[12]; to the top of the anonymous union in class OID. $ gcc -v Also occurs with gcc 4.4.5:
|
| Comments |
| Comment by Mathias Stearn [ 05/Apr/12 ] |
|
What does gcc -v say? Note that arm isn't fully supported so you may run into further issues even if you get this resolved. |
| Comment by Brian Hutchinson [ 05/Apr/12 ] |
|
I can confirm that it happens still on Ubuntu 11.04 ARM running on BeagleBoard native building 2.0.4. root@localhost:/mnt/mongodb# scons all \n std::str) Regards, Brian |
| Comment by Trevor Robinson [ 27/Jan/12 ] |
|
Not anymore, since I've upgraded to Ubuntu Oneiric, which uses GCC 4.6. It's probably still an issue in GCC 4.4 and 4.5, but no one should be using those on ARM, given all the ARM fixes going into 4.6+. |
| Comment by Mathias Stearn [ 21/Jan/12 ] |
|
Are you still seeing this? It isn't showing up in any of our buildbots. |
| Comment by Trevor Robinson [ 24/Jun/11 ] |
|
Patch (against current trunk) to fix |