Last Comment Bug 762071 - JS is being compiled with exceptions enabled
: JS is being compiled with exceptions enabled
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla16
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
Mentors:
Depends on:
Blocks: 733905 757568
  Show dependency treegraph
 
Reported: 2012-06-06 08:58 PDT by Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
Modified: 2012-06-19 12:07 PDT (History)
5 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use -fno-exceptions when building js (10.76 KB, patch)
2012-06-06 17:43 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
no flags Details | Diff | Review
Use -fno-exceptions when building js (12.78 KB, patch)
2012-06-07 07:11 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
khuey: review+
benjamin: review-
Details | Diff | Review
Use -fno-exceptions when building js (14.55 KB, patch)
2012-06-07 14:02 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
khuey: review+
Details | Diff | Review

Description Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-06-06 08:58:32 PDT
Search for jsarray in

http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/dteller@mozilla.com-34851bd63189/try-macosx64/try-macosx64-bm31-try1-build2866.txt.gz

and you will find

/usr/local/bin/ccache /usr/bin/g++-4.2 -arch i386 -o jsarray.o -c  -fvisibility=hidden -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\".dylib\" -DNO_NSPR_10_SUPPORT -Ictypes/libffi/include -I.  -I/builds/slave/try-osx64/build/js/src/../../mfbt/double-conversion -I/builds/slave/try-osx64/build/js/src -I. -I./../../dist/include -I./../../dist/include/nsprpub  -I/builds/slave/try-osx64/build/obj-firefox/i386/dist/include/nspr  -I/builds/slave/try-osx64/build/js/src -I/builds/slave/try-osx64/build/js/src/assembler -I/builds/slave/try-osx64/build/js/src/yarr  -fPIC  -fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -isysroot /Developer/SDKs/MacOSX10.6.sdk -fno-common -ffunction-sections -fdata-sections -pthread -pipe  -DNDEBUG -DTRIMMED -g -O3 -fno-stack-protector -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1   -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MF .deps/jsarray.pp /builds/slave/try-osx64/build/js/src/jsarray.cpp

note that -fno-exceptions is missing.
Comment 1 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-06-06 17:43:04 PDT
Created attachment 630783 [details] [diff] [review]
Use -fno-exceptions when building js

https://tbpl.mozilla.org/?tree=Try&rev=bf908d98c723

The build log at

https://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/respindola@mozilla.com-bf908d98c723/try-macosx64/try-macosx64-bm31-try1-build2888.txt.gz

shows that we are passing -fno-exceptions. The m-c build on which the try is based is http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-macosx64/1339016539/.

Comparing the two dmgs we find that the one on try is 253 KB smaller and XUL is 638 KB smaller.
Comment 2 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-06-06 17:50:51 PDT
I just noticed that the windows builders are not using the -gr- flag. I will debug it tomorrow.
Comment 3 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-06-07 07:11:51 PDT
Created attachment 630965 [details] [diff] [review]
Use -fno-exceptions when building js

https://tbpl.mozilla.org/?tree=Try&rev=10b2db4acfdd

This should work on windows too. This patch is on top of

https://tbpl.mozilla.org/?rev=7e4c2abb9fc9

I will compare the build sizes when it finishes.
Comment 4 Kyle Huey [:khuey] (khuey@mozilla.com) 2012-06-07 11:02:33 PDT
Comment on attachment 630965 [details] [diff] [review]
Use -fno-exceptions when building js

Review of attachment 630965 [details] [diff] [review]:
-----------------------------------------------------------------

bsmedberg needs to sign off on removing --enable-cpp-rtti here.
Comment 5 Benjamin Smedberg [:bsmedberg] 2012-06-07 11:22:42 PDT
Comment on attachment 630965 [details] [diff] [review]
Use -fno-exceptions when building js

The C++ RTTI flags can be very useful for debugging because you can in a debugger know the precise type of classes with vtables. I think we should keep the optional support for RTTI.
Comment 6 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-06-07 14:02:14 PDT
Created attachment 631126 [details] [diff] [review]
Use -fno-exceptions when building js

https://tbpl.mozilla.org/?tree=Try&rev=9e9e1a9149f1
Comment 7 Jeff Muizelaar [:jrmuizel] 2012-06-07 18:56:54 PDT
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #5)
> Comment on attachment 630965 [details] [diff] [review]
> Use -fno-exceptions when building js
> 
> The C++ RTTI flags can be very useful for debugging because you can in a
> debugger know the precise type of classes with vtables. I think we should
> keep the optional support for RTTI.

gdb can do this without needing RTTI by just looking at the vtable pointer and knowing what type it's for.
Comment 8 :Ehsan Akhgari (out sick) 2012-06-07 19:34:38 PDT
(In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> (In reply to Benjamin Smedberg  [:bsmedberg] from comment #5)
> > Comment on attachment 630965 [details] [diff] [review]
> > Use -fno-exceptions when building js
> > 
> > The C++ RTTI flags can be very useful for debugging because you can in a
> > debugger know the precise type of classes with vtables. I think we should
> > keep the optional support for RTTI.
> 
> gdb can do this without needing RTTI by just looking at the vtable pointer
> and knowing what type it's for.

True, but not all types have vtables.  :-)
Comment 9 Jeff Muizelaar [:jrmuizel] 2012-06-07 19:40:43 PDT
(In reply to Ehsan Akhgari [:ehsan] from comment #8)
> (In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> > (In reply to Benjamin Smedberg  [:bsmedberg] from comment #5)
> > > Comment on attachment 630965 [details] [diff] [review]
> > > Use -fno-exceptions when building js
> > > 
> > > The C++ RTTI flags can be very useful for debugging because you can in a
> > > debugger know the precise type of classes with vtables. I think we should
> > > keep the optional support for RTTI.
> > 
> > gdb can do this without needing RTTI by just looking at the vtable pointer
> > and knowing what type it's for.
> 
> True, but not all types have vtables.  :-)

But RTTI only adds information when you have one.
Comment 10 :Ehsan Akhgari (out sick) 2012-06-07 19:45:00 PDT
(In reply to Jeff Muizelaar [:jrmuizel] from comment #9)
> (In reply to Ehsan Akhgari [:ehsan] from comment #8)
> > (In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> > > (In reply to Benjamin Smedberg  [:bsmedberg] from comment #5)
> > > > Comment on attachment 630965 [details] [diff] [review]
> > > > Use -fno-exceptions when building js
> > > > 
> > > > The C++ RTTI flags can be very useful for debugging because you can in a
> > > > debugger know the precise type of classes with vtables. I think we should
> > > > keep the optional support for RTTI.
> > > 
> > > gdb can do this without needing RTTI by just looking at the vtable pointer
> > > and knowing what type it's for.
> > 
> > True, but not all types have vtables.  :-)
> 
> But RTTI only adds information when you have one.

Indeed!  Ignoring me sometimes is the best option.  ;-)
Comment 11 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-06-08 07:26:48 PDT
The last try was lost in the tbpl upgrade :-(
I pushed again to
https://tbpl.mozilla.org/?tree=Try&rev=21d1d6762f1e

and will push to m-i once the builds are done. I kept the rtti option. At least it is now in a central and easy to remove location  if it really has no use :-)
Comment 12 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-06-08 10:34:20 PDT
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=6536514d4baf
Comment 13 Ryan VanderMeulen [:RyanVM] 2012-06-09 19:08:51 PDT
https://hg.mozilla.org/mozilla-central/rev/6536514d4baf

Per the tree rules, please set the target milestone when landing on inbound.
Comment 14 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-06-11 06:08:40 PDT
(In reply to Ryan VanderMeulen from comment #13)
> https://hg.mozilla.org/mozilla-central/rev/6536514d4baf
> 
> Per the tree rules, please set the target milestone when landing on inbound.

First time I am told to do that. What is the rationale?

Note You need to log in before you can comment on or make changes to this bug.