Bug 961968

Summary: strict-aliasing issues in Firefox 17.0.6
Product: Red Hat Enterprise Linux 6 Reporter: Martin Stransky <stransky>
Component: xulrunnerAssignee: Martin Stransky <stransky>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: cschalle, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHSA-2013:0981 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-01 15:00:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Stransky 2013-05-10 20:59:36 UTC
Description of problem:

 1710  /builddir/build/BUILD/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h: In function 'bool JS_DefineFunctionsWithHelp(JSContext*, JSObject*, const JSFunctionSpecWithHelp*)':
  1711  /builddir/build/BUILD/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h:149: warning: dereferencing pointer 'obj$ptr' does break strict-aliasing rules
  1712  cc1plus: note: initialized from here
  1713  /builddir/build/BUILD/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h:149: warning: dereferencing pointer 'obj$ptr' does break strict-aliasing rules
  1721  /builddir/build/BUILD/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h: In function 'JSFunction* js_CloneFunctionObject(JSContext*, JS::HandleFunction, JS::HandleObject, JS::HandleObject, js::gc::AllocKind)':
  1722  /builddir/build/BUILD/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h:149: warning: dereferencing pointer 'obj$ptr' does break strict-aliasing rules
  1722  /builddir/build/BUILD/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h:149: warning: dereferencing pointer 'obj$ptr' does break strict-aliasing rules
  1723  /builddir/build/BUILD/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h:149: warning: dereferencing pointer 'obj$ptr' does break strict-aliasing rules
  1728  /builddir/build/BUILD/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h: In function 'JSFunction* js_NewFunction(JSContext*, JSObject*, JSBool (*)(JSContext*, unsigned int, jsval*), unsigned int, unsigned int, JS::HandleObject, JSAtom*, js::gc::AllocKind)':
  1729  /builddir/build/BUILD/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h:149: warning: dereferencing pointer 'obj$ptr' does break strict-aliasing rules

Comment 1 Martin Stransky 2013-05-13 12:31:51 UTC
Seems to affect 17ESR line only, 21.0 is completely built with no-strict-aliasing. Looks like we miss that on some places on ESR 17.

Comment 2 Martin Stransky 2013-05-13 14:02:05 UTC
hm, I wonder why the same code built on Fedora 18 (gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC)) does not produce the warnings:

c++ -o jscrashreport.o -c  -I./../../dist/system_wrappers_js -include /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/config/gcc_hidden.h -DENABLE_YARR_JIT=1 -DMOZ_GLUE_IN_PROGRAM -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\".so\" -DNO_NSPR_10_SUPPORT -DUSE_ZLIB -Ictypes/libffi/include -I.  -I/home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/../../mfbt/double-conversion -I/home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src -I. -I./../../dist/include  -I/usr/include/nspr4      -I/home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src -I/home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/assembler -I/home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/yarr  -fPIC  -pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -Wno-long-long -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpermissive -gdwarf-2 -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -pthread -pipe  -DNDEBUG -DTRIMMED -g -O3 -freorder-blocks  -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1   -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MF .deps/jscrashreport.o.pp /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jscrashreport.cpp
jsinfer.cpp
In file included from /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jsapi.h:26:0,
                 from /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jscrashreport.cpp:8:
/home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h: In static member function 'static void JS::RootSink<JSStableString*>::dispose(JSStableString*)':
/home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/gc/Root.h:279:35: warning: variable 'sink' set but not used [-Wunused-but-set-variable]
In file included from /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jsapi.h:32:0,
                 from /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jscrashreport.cpp:8:
./../../dist/include/js/Vector.h: At global scope:
./../../dist/include/js/Vector.h:572:1: warning: function 'bool js::Vector<T, MinInlineCapacity, AllocPolicy>::calculateNewCapacity(size_t, size_t, size_t&)' redeclared as inline [-Wattributes]
In file included from /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jsapi.h:32:0,
                 from /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jscrashreport.cpp:8:
./../../dist/include/js/Vector.h:191:36: warning: previous declaration of 'bool js::Vector<T, MinInlineCapacity, AllocPolicy>::calculateNewCapacity(size_t, size_t, size_t&)' with attribute noinline [-Wattributes]
In file included from /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jspropertycache.h:15:0,
                 from /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jscntxt.h:23,
                 from /home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/jscrashreport.cpp:9:
/home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/vm/String.h:398:24: warning: inline function 'static void JSString::writeBarrierPost(JSString*, void*)' used but never defined [enabled by default]
/home/komat/CVSRH/xulrunner/rhel-6.5/xulrunner-17.0.6/mozilla-esr17/js/src/vm/String.h:397:24: warning: inline function 'static void JSString::writeBarrierPre(JSString*)' used but never defined [enabled by default]

Comment 3 Martin Stransky 2013-05-13 14:11:10 UTC
An upstream bug - https://bugzilla.mozilla.org/show_bug.cgi?id=821502

Comment 4 Martin Stransky 2013-05-13 15:16:58 UTC
The fix has been uploaded to git and will be released with next Firefox update.

Comment 6 RHEL Program Management 2013-06-10 18:37:42 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 7 Martin Stransky 2013-07-01 15:00:11 UTC
Fixed in RHSA-2013:0981.