WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
53620
GCC compiler on ARM issues bogus warnings and fails to compile.
https://bugs.webkit.org/show_bug.cgi?id=53620
Summary
GCC compiler on ARM issues bogus warnings and fails to compile.
Dimitri Glazkov (Google)
Reported
2011-02-02 13:05:50 PST
GCC compiler on ARM issues bogus warnings and fails to compile.
Attachments
Patch
(1.87 KB, patch)
2011-02-02 13:06 PST
,
Dimitri Glazkov (Google)
no flags
Details
Formatted Diff
Diff
Prettier words.
(2.16 KB, patch)
2011-02-02 15:59 PST
,
Dimitri Glazkov (Google)
no flags
Details
Formatted Diff
Diff
Fixed my mistakes.
(2.11 KB, patch)
2011-02-02 16:16 PST
,
Dimitri Glazkov (Google)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Dimitri Glazkov (Google)
Comment 1
2011-02-02 13:06:39 PST
Created
attachment 80955
[details]
Patch
Dimitri Glazkov (Google)
Comment 2
2011-02-02 13:23:11 PST
Here's an example from
http://build.chromium.org/p/chromium/builders/Arm/builds/4693/steps/compile/logs/stdio
: cc1plus: warnings being treated as errors third_party/WebKit/Source/WebCore/css/CSSPrimitiveValue.cpp: In static member function 'static WTF::PassRefPtr<WebCore::CSSPrimitiveValue> WebCore::CSSPrimitiveValue::createColor(unsigned int)': third_party/WebKit/Source/WebCore/css/CSSPrimitiveValue.cpp:130: error: 'colorTransparent.unstatic.4909' may be used uninitialized in this function
Eric Seidel (no email)
Comment 3
2011-02-02 13:23:11 PST
Comment on
attachment 80955
[details]
Patch Please link to the GCC bug url both in the ChangeLog and the actual code change. The ChangeLog should give an example of the warning and explain better what we're doing here.
Eric Seidel (no email)
Comment 4
2011-02-02 13:24:29 PST
Is it possible to also just disable that warning on the arm build? The code change is an OK approach, but I wonder if there is a nicer hack for ARM? We could also encase the added code in an ARM #ifdef?
Eric Seidel (no email)
Comment 5
2011-02-02 13:25:28 PST
My main goal here is to make the code you're adding easily self-documenting as to when it can be removed. Currently what you're adding can never be removed for fear of breaking some obscure compiler that I don't have access to. You should better document (ideally through #ifdefs and bug links) when it can be removed.
Dimitri Glazkov (Google)
Comment 6
2011-02-02 13:49:18 PST
Compiler: gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Dimitri Glazkov (Google)
Comment 7
2011-02-02 13:56:15 PST
(In reply to
comment #5
)
> My main goal here is to make the code you're adding easily self-documenting as to when it can be removed. Currently what you're adding can never be removed for fear of breaking some obscure compiler that I don't have access to. You should better document (ideally through #ifdefs and bug links) when it can be removed.
I like the idea of the ifdefs. I'll ask nsylvain to try it on the device.
Dimitri Glazkov (Google)
Comment 8
2011-02-02 15:12:30 PST
(In reply to
comment #4
)
> Is it possible to also just disable that warning on the arm build? The code change is an OK approach, but I wonder if there is a nicer hack for ARM? > > We could also encase the added code in an ARM #ifdef?
The warning is explicitly disabled. I double-checked. Here's the spew from make V=1 for the CSSPrimitiveValue. If you search for it, the -Wno-uninitialized is there: /usr/local/crosstool-trusted/arm-2009q3/bin/arm-none-linux-gnueabi-g++ -B/usr/local/tot-binutils/arm-none-linux-gnueabi/bin '-DNO_TCMALLOC' '-DNO_HEAPCHECKER' '-DDISABLE_NACL' '-DCHROMIUM_BUILD' '-DTOOLKIT_VIEWS=1' '-DOS_CHROMEOS=1' '-DENABLE_REMOTING=1' '-DENABLE_FLAPPER_HACKS=1' '-DENABLE_GPU=1' '-DWEBCORE_NAVIGATOR_VENDOR="Google Inc."' '-DENABLE_3D_CANVAS=1' '-DENABLE_3D_PLUGIN=1' '-DENABLE_BLOB=1' '-DENABLE_BLOB_SLICE=1' '-DENABLE_CHANNEL_MESSAGING=1' '-DENABLE_CLIENT_BASED_GEOLOCATION=1' '-DENABLE_DASHBOARD_SUPPORT=0' '-DENABLE_DATABASE=1' '-DENABLE_DATAGRID=0' '-DENABLE_DEVICE_ORIENTATION=1' '-DENABLE_DIRECTORY_UPLOAD=1' '-DENABLE_DOM_STORAGE=1' '-DENABLE_EVENTSOURCE=1' '-DENABLE_FILE_SYSTEM=1' '-DENABLE_FILTERS=1' '-DENABLE_GEOLOCATION=1' '-DENABLE_ICONDATABASE=0' '-DENABLE_INDEXED_DATABASE=1' '-DENABLE_INPUT_SPEECH=1' '-DENABLE_JAVASCRIPT_DEBUGGER=1' '-DENABLE_JSC_MULTIPLE_THREADS=0' '-DENABLE_LINK_PREFETCH=1' '-DENABLE_METER_TAG=1' '-DENABLE_NOTIFICATIONS=1' '-DENABLE_OFFLINE_WEB_APPLICATIONS=1' '-DENABLE_OPENTYPE_SANITIZER=1' '-DENABLE_ORIENTATION_EVENTS=0' '-DENABLE_PROGRESS_TAG=1' '-DENABLE_REQUEST_ANIMATION_FRAME=1' '-DENABLE_RUBY=1' '-DENABLE_SANDBOX=1' '-DENABLE_SHARED_WORKERS=1' '-DENABLE_SVG=1' '-DENABLE_SVG_ANIMATION=1' '-DENABLE_SVG_AS_IMAGE=1' '-DENABLE_SVG_FONTS=1' '-DENABLE_SVG_FOREIGN_OBJECT=1' '-DENABLE_SVG_USE=1' '-DENABLE_TOUCH_EVENTS=1' '-DENABLE_V8_SCRIPT_DEBUG_SERVER=1' '-DENABLE_VIDEO=1' '-DENABLE_WEB_SOCKETS=1' '-DENABLE_WEB_TIMING=1' '-DENABLE_WEBGL=1' '-DENABLE_WORKERS=1' '-DENABLE_XHR_RESPONSE_BLOB=1' '-DENABLE_XPATH=1' '-DENABLE_XSLT=1' '-DWTF_USE_WEBP=1' '-DWTF_USE_WEBKIT_IMAGE_DECODERS=1' '-DWTF_USE_ACCELERATED_COMPOSITING=1' '-DENABLE_3D_RENDERING=1' '-DENABLE_ACCELERATED_2D_CANVAS=1' '-DBUILDING_CHROMIUM__=1' '-DUSE_SYSTEM_MALLOC=1' '-DWTF_USE_PTHREADS=1' '-DU_STATIC_IMPLEMENTATION' '-DSK_BUILD_NO_IMAGE_ENCODE' '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' '-DGR_SKIP_2POINTRADIAL_PROGRAMS' '-DUSE_SYSTEM_LIBPNG' '-DLIBXML_STATIC' '-DLIBXSLT_STATIC' '-DUSE_SYSTEM_LIBJPEG' '-D__STDC_FORMAT_MACROS' '-DNDEBUG' '-DNVALGRIND' '-DDYNAMIC_ANNOTATIONS_ENABLED=0' -Ithird_party/icu/public/common -Ithird_party/icu/public/i18n -Igpu -Iout/Release/obj.target/geni -Ithird_party/WebKit/Source/WebCore -Ithird_party/WebKit/Source/WebCore/accessibility -Ithird_party/WebKit/Source/WebCore/accessibility/chromium -Ithird_party/WebKit/Source/WebCore/bindings -Ithird_party/WebKit/Source/WebCore/bindings/generic -Ithird_party/WebKit/Source/WebCore/bindings/v8 -Ithird_party/WebKit/Source/WebCore/bindings/v8/custom -Ithird_party/WebKit/Source/WebCore/bindings/v8/specialization -Ithird_party/WebKit/Source/WebCore/css -Ithird_party/WebKit/Source/WebCore/dom -Ithird_party/WebKit/Source/WebCore/dom/default -Ithird_party/WebKit/Source/WebCore/editing -Ithird_party/WebKit/Source/WebCore/fileapi -Ithird_party/WebKit/Source/WebCore/history -Ithird_party/WebKit/Source/WebCore/html -Ithird_party/WebKit/Source/WebCore/html/canvas -Ithird_party/WebKit/Source/WebCore/html/parser -Ithird_party/WebKit/Source/WebCore/html/shadow -Ithird_party/WebKit/Source/WebCore/inspector -Ithird_party/WebKit/Source/WebCore/loader -Ithird_party/WebKit/Source/WebCore/loader/appcache -Ithird_party/WebKit/Source/WebCore/loader/archive -Ithird_party/WebKit/Source/WebCore/loader/cache -Ithird_party/WebKit/Source/WebCore/loader/icon -Ithird_party/WebKit/Source/WebCore/mathml -Ithird_party/WebKit/Source/WebCore/notifications -Ithird_party/WebKit/Source/WebCore/page -Ithird_party/WebKit/Source/WebCore/page/animation -Ithird_party/WebKit/Source/WebCore/page/chromium -Ithird_party/WebKit/Source/WebCore/platform -Ithird_party/WebKit/Source/WebCore/platform/animation -Ithird_party/WebKit/Source/WebCore/platform/audio -Ithird_party/WebKit/Source/WebCore/platform/audio/chromium -Ithird_party/WebKit/Source/WebCore/platform/chromium -Ithird_party/WebKit/Source/WebCore/platform/graphics -Ithird_party/WebKit/Source/WebCore/platform/graphics/chromium -Ithird_party/WebKit/Source/WebCore/platform/graphics/filters -Ithird_party/WebKit/Source/WebCore/platform/graphics/gpu -Ithird_party/WebKit/Source/WebCore/platform/graphics/opentype -Ithird_party/WebKit/Source/WebCore/platform/graphics/skia -Ithird_party/WebKit/Source/WebCore/platform/graphics/transforms -Ithird_party/WebKit/Source/WebCore/platform/image-decoders -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/bmp -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/gif -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/ico -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/jpeg -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/png -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/skia -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/xbm -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/webp -Ithird_party/WebKit/Source/WebCore/platform/image-encoders/skia -Ithird_party/WebKit/Source/WebCore/platform/mock -Ithird_party/WebKit/Source/WebCore/platform/network -Ithird_party/WebKit/Source/WebCore/platform/network/chromium -Ithird_party/WebKit/Source/WebCore/platform/sql -Ithird_party/WebKit/Source/WebCore/platform/text -Ithird_party/WebKit/Source/WebCore/platform/text/transcoder -Ithird_party/WebKit/Source/WebCore/plugins -Ithird_party/WebKit/Source/WebCore/plugins/chromium -Ithird_party/WebKit/Source/WebCore/rendering -Ithird_party/WebKit/Source/WebCore/rendering/style -Ithird_party/WebKit/Source/WebCore/rendering/svg -Ithird_party/WebKit/Source/WebCore/storage -Ithird_party/WebKit/Source/WebCore/storage/chromium -Ithird_party/WebKit/Source/WebCore/svg -Ithird_party/WebKit/Source/WebCore/svg/animation -Ithird_party/WebKit/Source/WebCore/svg/graphics -Ithird_party/WebKit/Source/WebCore/svg/graphics/filters -Ithird_party/WebKit/Source/WebCore/svg/properties -Ithird_party/WebKit/Source/WebCore/thirdparty/glu -Ithird_party/WebKit/Source/WebCore/webaudio -Ithird_party/WebKit/Source/WebCore/websockets -Ithird_party/WebKit/Source/WebCore/workers -Ithird_party/WebKit/Source/WebCore/xml -Ithird_party/angle/include/GLSLANG -Iout/Release/obj/gen/webkit -Iout/Release/obj/gen/webkit/bindings -Ithird_party/WebKit/Source/JavaScriptCore -Ithird_party/WebKit/Source/JavaScriptCore/wtf -I. -Iskia/config -Ithird_party/skia/include/config -Ithird_party/skia/include/core -Ithird_party/skia/include/effects -Ithird_party/skia/include/gpu -Ithird_party/skia/gpu/include -Iskia/ext -Ithird_party/iccjpeg -Ithird_party/libwebp -Ithird_party/libwebp/webp -Ithird_party/libxml/linux/include -Ithird_party/libxml/src/include -Ithird_party/libxslt -Ithird_party/npapi -Ithird_party/npapi/bindings -Ithird_party/ots/include -Ithird_party/sqlite -Iv8/include -Wno-uninitialized -Werror -pthread -fno-exceptions -Wall -Wno-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=64 -fvisibility=hidden -pipe -fPIC -fno-strict-aliasing -I/usr/local/arm-rootfs/usr/include/libpng12 -I/usr/local/arm-rootfs/usr/include -pthread -I/usr/local/arm-rootfs/usr/include/gtk-2.0 -I/usr/local/arm-rootfs/usr/lib/gtk-2.0/include -I/usr/local/arm-rootfs/usr/include/atk-1.0 -I/usr/local/arm-rootfs/usr/include/cairo -I/usr/local/arm-rootfs/usr/include/pango-1.0 -I/usr/local/arm-rootfs/usr/include/glib-2.0 -I/usr/local/arm-rootfs/usr/lib/glib-2.0/include -I/usr/local/arm-rootfs/usr/include/pixman-1 -I/usr/local/arm-rootfs/usr/include/freetype2 -I/usr/local/arm-rootfs/usr/include -I/usr/local/arm-rootfs/usr/include/libpng12 -mthumb -Wa,-mimplicit-it=thumb -march=armv7-a -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=vfpv3-d16 --sysroot=/usr/local/arm-rootfs -O2 -fno-ident -fdata-sections -ffunction-sections -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-abi -MMD -MF out/Release/.deps/out/Release/obj.target/webcore_remaining/third_party/WebKit/Source/WebCore/css/CSSPrimitiveValue.o.d.raw -c -o out/Release/obj.target/webcore_remaining/third_party/WebKit/Source/WebCore/css/CSSPrimitiveValue.o third_party/WebKit/Source/WebCore/css/CSSPrimitiveValue.cpp
Dimitri Glazkov (Google)
Comment 9
2011-02-02 15:59:29 PST
Created
attachment 80991
[details]
Prettier words.
WebKit Review Bot
Comment 10
2011-02-02 16:12:33 PST
Attachment 80991
[details]
did not build on chromium: Build output:
http://queues.webkit.org/results/7687694
Dimitri Glazkov (Google)
Comment 11
2011-02-02 16:13:57 PST
Comment on
attachment 80991
[details]
Prettier words. i suck.
Eric Seidel (no email)
Comment 12
2011-02-02 16:14:38 PST
Comment on
attachment 80991
[details]
Prettier words. Definitely better. do we not have any information about the compiler bug itself? gcc has a bugzilla instance. :) We don't know what versions this affects? It's stil impossible to ever remove this code as written...
Dimitri Glazkov (Google)
Comment 13
2011-02-02 16:16:38 PST
Created
attachment 80998
[details]
Fixed my mistakes.
Dimitri Glazkov (Google)
Comment 14
2011-02-02 16:21:29 PST
(In reply to
comment #12
)
> (From update of
attachment 80991
[details]
) > Definitely better. do we not have any information about the compiler bug itself? gcc has a bugzilla instance. :) We don't know what versions this affects? It's stil impossible to ever remove this code as written...
I scanned gcc.gnu.org, but couldn't find anything interesting. Lots of bugs related to the warning, all in different states. I mentioned the version in the ChangeLog. This would be a much more doable task if I actually had access to an ARM device. Right now, it takes me asking nsylvain to patch the bot (!!!!) and see of the patch actually works -- for each iteration.
Build Bot
Comment 15
2011-02-02 16:35:11 PST
Attachment 80991
[details]
did not build on win: Build output:
http://queues.webkit.org/results/7690236
David Levin
Comment 16
2011-02-02 18:12:00 PST
Comment on
attachment 80998
[details]
Fixed my mistakes. ok.
Dimitri Glazkov (Google)
Comment 17
2011-02-02 18:43:33 PST
Comment on
attachment 80998
[details]
Fixed my mistakes. Yaaay!
WebKit Commit Bot
Comment 18
2011-02-02 20:41:10 PST
Comment on
attachment 80998
[details]
Fixed my mistakes. Clearing flags on attachment: 80998 Committed
r77464
: <
http://trac.webkit.org/changeset/77464
>
WebKit Commit Bot
Comment 19
2011-02-02 20:41:17 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 20
2011-02-04 10:03:58 PST
Comment on
attachment 80998
[details]
Fixed my mistakes. View in context:
https://bugs.webkit.org/attachment.cgi?id=80998&action=review
> Source/WebCore/css/CSSPrimitiveValue.cpp:130 > +#if CPU(ARM) && OS(LINUX)
I’d rather see a condition that more directly targets the buggy compiler. For example, this expression doesn’t even include COMPILER(GCC)!
> Source/WebCore/css/CSSPrimitiveValue.cpp:131 > + // A workaround for gcc bug on ARM.
It would be so much better if this had specifics about the bug.
David Levin
Comment 21
2011-02-04 13:47:56 PST
(In reply to
comment #20
)
> (From update of
attachment 80998
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=80998&action=review
> > > Source/WebCore/css/CSSPrimitiveValue.cpp:130 > > +#if CPU(ARM) && OS(LINUX) > > I’d rather see a condition that more directly targets the buggy compiler. For example, this expression doesn’t even include COMPILER(GCC)! > > > Source/WebCore/css/CSSPrimitiveValue.cpp:131 > > + // A workaround for gcc bug on ARM. > > It would be so much better if this had specifics about the bug.
Filed
bug 53808
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug