On 2014/11/02 11:55, ISHIKAWA, Chiaki wrote:
> For the last few days, I got a strange segmentation error
> during C++ data initialization (of a dynamically loaded module?).
> 
> gcc-4.9 --version
> gcc-4.9 (Debian 4.9.1-15) 4.9.1
> 
> I tried both ld.gold and (traditional bfd) ld.
> 
> I looked for similar issues using google, and it seems to suggest
> that I may have hit an initialization order problem of a sort.
> I am compiling a DEBUG version of C-C TB.
> I refreshed source code a few days ago before seeing this problem.
> However, other than minor patches in .js files, and a few changes in
> .cpp files, I don't think I have touched the initialization aspect of
> the source code.
> 
> Anyway, please see the stack trace as below.
> 
> ishikawa@ip030:/REF-COMM-CENTRAL/comm-central$ gdb
> /REF-OBJ-DIR/objdir-tb3/dist/bin/thunderbird
> GNU gdb (Debian 7.7.1+dfsg-3) 7.7.1
> Copyright (C) 2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from /REF-OBJ-DIR/objdir-tb3/dist/bin/thunderbird...done.
> (gdb) run
> Starting program: /REF-OBJ-DIR/objdir-tb3/dist/bin/thunderbird
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Loading JavaScript value pretty-printers; see js/src/gdb/README.
> If they cause trouble, type: disable pretty-printer .* SpiderMonkey
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000000000 in ?? ()
> (gdb) where
> #0  0x0000000000000000 in ?? ()
> #1  0x00007ffff1fbe6bf in __static_initialization_and_destruction_0
> (__priority=65535, __initialize_p=1)
>      at
> /REF-COMM-CENTRAL/comm-central/mozilla/dom/html/HTMLInputElement.cpp:193
> #2  _GLOBAL__sub_I_HTMLInputElement.cpp(void) () at
> /REF-COMM-CENTRAL/comm-central/mozilla/dom/html/HTMLInputElement.cpp:7481
> #3  0x00007ffff7dea9fa in ?? () from /lib64/ld-linux-x86-64.so.2
> #4  0x00007ffff7deaae3 in ?? () from /lib64/ld-linux-x86-64.so.2
> #5  0x00007ffff7deec48 in ?? () from /lib64/ld-linux-x86-64.so.2
> #6  0x00007ffff7dea8b4 in ?? () from /lib64/ld-linux-x86-64.so.2
> #7  0x00007ffff7dee43b in ?? () from /lib64/ld-linux-x86-64.so.2
> #8  0x00007ffff79bc02b in ?? () from /lib/x86_64-linux-gnu/libdl.so.2
> #9  0x00007ffff7dea8b4 in ?? () from /lib64/ld-linux-x86-64.so.2
> #10 0x00007ffff79bc5dd in ?? () from /lib/x86_64-linux-gnu/libdl.so.2
> #11 0x00007ffff79bc0c1 in dlopen () from /lib/x86_64-linux-gnu/libdl.so.2
> #12 0x0000000000402943 in GetLibHandle (aDependentLib=0x7fffffffa710
> "/REF-OBJ-DIR/objdir-tb3/dist/bin/libxul.so")
>      at
> /REF-COMM-CENTRAL/comm-central/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp:227
> #13 ReadDependentCB (aDoPreload=<optimized out>,
> aDependentLib=0x7fffffffa710 "/REF-OBJ-DIR/objdir-tb3/dist/bin/libxul.so")
>      at
> /REF-COMM-CENTRAL/comm-central/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp:276
> #14 XPCOMGlueLoad (aXPCOMFile=<optimized out>)
>      at
> /REF-COMM-CENTRAL/comm-central/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp:456
> #15 0x0000000000402b2c in XPCOMGlueStartup (aXPCOMFile=<optimized out>)
>      at
> /REF-COMM-CENTRAL/comm-central/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp:521
> #16 0x0000000000401195 in InitXPCOMGlue (argv0=<optimized out>,
> xreDirectory=xreDirectory@entry=0x7fffffffd7b8)
>      at /REF-COMM-CENTRAL/comm-central/mail/app/nsMailApp.cpp:286
> #17 0x00000000004015fa in main (argc=1, argv=0x7fffffffd9e8) at
> /REF-COMM-CENTRAL/comm-central/mail/app/nsMailApp.cpp:351
> (gdb) quit
> A debugging session is active.
> 
>       Inferior 1 [process 11151] will be killed.
> 
> Quit anyway? (y or n) y
> ishikawa@ip030:/REF-COMM-CENTRAL/comm-central$
> 
> 
> The code in question is, indeed, an initializer.
> 
>    189        
>    190        // Default inputmode value is "auto".
>    191        static const nsAttrValue::EnumTable* kInputDefaultInputmode =
> &kInputInputmodeTable[0];
>    192        
> * 193 const Decimal HTMLInputElement::kStepScaleFactorDate =
> Decimal(86400000);
>    194        const Decimal HTMLInputElement::kStepScaleFactorNumberRange =
> Decimal(1);
>    195        const Decimal HTMLInputElement::kStepScaleFactorTime = 
> Decimal(1000);
>    196        const Decimal HTMLInputElement::kDefaultStepBase = Decimal(0);
> 
> Has anyone seen the problem with the latest source file?
> 
> Or does anyone have any idea for a possible workaround?
> 
> cf. Decimal
> (I am not familiar with the code.
> My guess is that
> an initializer to set the value of kStepScaleFactorDate
> with Decimal(8640000) is failing, and maybe a function pointer used
> inside the initializer is not initialized (0x0000....000)?)
> 

There is a possibility that I may have hit a feature of GCC 4.9 after I
relazed the optimization flag from -O2 o -O.

I am trying to see if using compiling the DEBUG version of C-C TB with
GCC 4.8 exhibits the same behavior.

TIA

_______________________________________________
dev-builds mailing list
dev-builds@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-builds

Reply via email to