public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step
@ 2014-06-11 12:43 gk at torproject dot org
  2014-06-11 12:45 ` [Bug sanitizer/61475] " kcc at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gk at torproject dot org @ 2014-06-11 12:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61475

            Bug ID: 61475
           Summary: Building Firefox with ASan is broken in the packaging
                    step
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gk at torproject dot org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org

As mentioned in bug 61408 building Firefox 24 (and probably later Firefox
versions as well) with ASan is broken on GCC trunk. The build crashes in the
packaging step as follows:

Executing
/home/gk/asan/mozilla-esr24/obj-x86_64-unknown-linux-gnu/dist/bin/xpcshell -g
/home/gk/asan/mozilla-esr24/obj-x86_64-unknown-linux-gnu/dist/bin/ -a
/home/gk/asan/mozilla-esr24/obj-x86_64-unknown-linux-gnu/dist/bin/ -f
/home/gk/asan/mozilla-esr24/toolkit/mozapps/installer/precompile_cache.js -e
precompile_startupcache("resource://gre/");
=================================================================
==22303==ERROR: AddressSanitizer: unknown-crash on address 0x2ad2d31bd3c0 at pc
0x2ad2d1803362 bp 0x7fff8f6149c0 sp 0x7fff8f6149b8
READ of size 16 at 0x2ad2d31bd3c0 thread T0
    #0 0x2ad2d1803361 in nsIDHashKey ../../dist/include/nsHashKeys.h:375
    #1 0x2ad2d1803361 in nsBaseHashtableET
../../dist/include/nsBaseHashtable.h:408
    #2 0x2ad2d1803361 in nsTHashtable<nsBaseHashtableET<nsIDHashKey,
nsFactoryEntry*> >::s_InitEntry(PLDHashTable*, PLDHashEntryHdr*, void const*)
../../dist/include/nsTHashtable.h:472
    #3 0x2ad2d179ad39 in PL_DHashTableOperate
/home/gk/asan/mozilla-esr24/obj-x86_64-unknown-linux-gnu/xpcom/build/pldhash.cpp:630
    #4 0x2ad2d1805d75 in nsTHashtable<nsBaseHashtableET<nsIDHashKey,
nsFactoryEntry*> >::PutEntry(nsID const&, mozilla::fallible_t const&)
../../dist/include/nsTHashtable.h:184
    #5 0x2ad2d1805d75 in nsTHashtable<nsBaseHashtableET<nsIDHashKey,
nsFactoryEntry*> >::PutEntry(nsID const&) ../../dist/include/nsTHashtable.h:170
    #6 0x2ad2d1805d75 in nsBaseHashtable<nsIDHashKey, nsFactoryEntry*,
nsFactoryEntry*>::Put(nsID const&, nsFactoryEntry* const&, mozilla::fallible_t
const&) ../../dist/include/nsBaseHashtable.h:147
    #7 0x2ad2d1805d75 in nsBaseHashtable<nsIDHashKey, nsFactoryEntry*,
nsFactoryEntry*>::Put(nsID const&, nsFactoryEntry* const&)
../../dist/include/nsBaseHashtable.h:141
    #8 0x2ad2d1806065 in
nsComponentManagerImpl::RegisterCIDEntryLocked(mozilla::Module::CIDEntry
const*, nsComponentManagerImpl::KnownModule*)
/home/gk/asan/mozilla-esr24/xpcom/components/nsComponentManager.cpp:502
    #9 0x2ad2d1809d35 in nsComponentManagerImpl::RegisterModule(mozilla::Module
const*, mozilla::FileLocation*)
/home/gk/asan/mozilla-esr24/xpcom/components/nsComponentManager.cpp:453
    #10 0x2ad2d180aba2 in nsComponentManagerImpl::Init()
/home/gk/asan/mozilla-esr24/xpcom/components/nsComponentManager.cpp:389
    #11 0x2ad2d17a1fb0 in NS_InitXPCOM2
/home/gk/asan/mozilla-esr24/xpcom/build/nsXPComInit.cpp:467
    #12 0x406d4b in main
/home/gk/asan/mozilla-esr24/js/xpconnect/shell/xpcshell.cpp:1566
    #13 0x2ad2d59b6c8c in __libc_start_main (/lib/libc.so.6+0x1ec8c)
    #14 0x407ea0
(/home/gk/asan/mozilla-esr24/obj-x86_64-unknown-linux-gnu/dist/bin/xpcshell+0x407ea0)

0x2ad2d31bd3c0 is located 0 bytes inside of global variable
'kComponentManagerCID' from
'/home/gk/asan/mozilla-esr24/xpcom/build/nsXPComInit.cpp' (0x2ad2d31bd3c0) of
size 16
SUMMARY: AddressSanitizer: unknown-crash ../../dist/include/nsHashKeys.h:375
nsIDHashKey
Shadow bytes around the buggy address:
  0x055ada62fa20: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
  0x055ada62fa30: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
  0x055ada62fa40: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
  0x055ada62fa50: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
  0x055ada62fa60: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
=>0x055ada62fa70: 00 00 f9 f9 f9 f9 f9 f9[00]00 f9 f9 f9 f9 f9 f9
  0x055ada62fa80: 07 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 04 f9 f9 f9
  0x055ada62fa90: f9 f9 f9 f9 00 02 f9 f9 f9 f9 f9 f9 00 00 00 00
  0x055ada62faa0: 05 f9 f9 f9 f9 f9 f9 f9 06 f9 f9 f9 f9 f9 f9 f9
  0x055ada62fab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x055ada62fac0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  ASan internal:           fe
==22303==ABORTING

This happened on a machine running Ubuntu Precise.

After a lot of fiddling I got Firefox (+ASan) compiled and packaged with
LLVM/Clang trunk on the same Ubuntu Precise machine without problems.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/61475] Building Firefox with ASan is broken in the packaging step
  2014-06-11 12:43 [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step gk at torproject dot org
@ 2014-06-11 12:45 ` kcc at gcc dot gnu.org
  2014-06-11 12:55 ` y.gribov at samsung dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: kcc at gcc dot gnu.org @ 2014-06-11 12:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61475

--- Comment #1 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
Please
  1. try building with -static-libasan 
  2. provide full reproduction steps


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/61475] Building Firefox with ASan is broken in the packaging step
  2014-06-11 12:43 [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step gk at torproject dot org
  2014-06-11 12:45 ` [Bug sanitizer/61475] " kcc at gcc dot gnu.org
@ 2014-06-11 12:55 ` y.gribov at samsung dot com
  2014-06-11 13:09 ` gk at torproject dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: y.gribov at samsung dot com @ 2014-06-11 12:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61475

Yury Gribov <y.gribov at samsung dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |y.gribov at samsung dot com

--- Comment #2 from Yury Gribov <y.gribov at samsung dot com> ---
Perhaps dup of bug 61422?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/61475] Building Firefox with ASan is broken in the packaging step
  2014-06-11 12:43 [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step gk at torproject dot org
  2014-06-11 12:45 ` [Bug sanitizer/61475] " kcc at gcc dot gnu.org
  2014-06-11 12:55 ` y.gribov at samsung dot com
@ 2014-06-11 13:09 ` gk at torproject dot org
  2014-06-11 13:10 ` gk at torproject dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: gk at torproject dot org @ 2014-06-11 13:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61475

--- Comment #3 from Georg Koppen <gk at torproject dot org> ---
(In reply to Kostya Serebryany from comment #1)
> Please
>   1. try building with -static-libasan

I'll do that once I am done with investigating bug 61408.

>   2. provide full reproduction steps

1) Take an Ubuntu Precise.
2) Compile GCC (I used the trunk from June 4 as the current has an ICE when
compiling Firefox which I need to report as well). I compiled it with
--prefix=/path/to/my/dir --disable-multilib --enable-languages=c,c++.
3) Grab the latest Firefox ESR 24 source code
(https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest-esr/source/firefox-24.6.0esr.source.tar.bz2).
4) Extract it and change into mozilla-esr24.
5) Save the attached mozconfig as .mozconfig in mozille-esr24.
6) Adjust your path to point to your freshly compiled GCC and point
LD_LIBRARY_PATH to your GCC-dir/lib64 (assuming you are compiling on a 64bit
system).
7) Run |make -j4 -f client.mk build|.
8) After successful compilation package Firefox with |make -C obj* package
INNER_MAKE_PACKAGE=true|.
9) It crashes as mentioned in the description.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/61475] Building Firefox with ASan is broken in the packaging step
  2014-06-11 12:43 [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step gk at torproject dot org
                   ` (2 preceding siblings ...)
  2014-06-11 13:09 ` gk at torproject dot org
@ 2014-06-11 13:10 ` gk at torproject dot org
  2014-06-12  7:04 ` gk at torproject dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: gk at torproject dot org @ 2014-06-11 13:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61475

--- Comment #4 from Georg Koppen <gk at torproject dot org> ---
Created attachment 32924
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32924&action=edit
.mozconfig for building Firefox ESR 24 with ASan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/61475] Building Firefox with ASan is broken in the packaging step
  2014-06-11 12:43 [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step gk at torproject dot org
                   ` (3 preceding siblings ...)
  2014-06-11 13:10 ` gk at torproject dot org
@ 2014-06-12  7:04 ` gk at torproject dot org
  2014-06-16  8:11 ` kcc at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: gk at torproject dot org @ 2014-06-12  7:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61475

--- Comment #5 from Georg Koppen <gk at torproject dot org> ---
(In reply to Georg Koppen from comment #3)
> (In reply to Kostya Serebryany from comment #1)
> > Please
> >   1. try building with -static-libasan
> 
> I'll do that once I am done with investigating bug 61408.

That didn't help either. I am getting the same crash.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/61475] Building Firefox with ASan is broken in the packaging step
  2014-06-11 12:43 [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step gk at torproject dot org
                   ` (4 preceding siblings ...)
  2014-06-12  7:04 ` gk at torproject dot org
@ 2014-06-16  8:11 ` kcc at gcc dot gnu.org
  2014-06-16  8:22 ` y.gribov at samsung dot com
  2014-06-24  8:51 ` gk at torproject dot org
  7 siblings, 0 replies; 9+ messages in thread
From: kcc at gcc dot gnu.org @ 2014-06-16  8:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61475

--- Comment #6 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
So, clang trunk works and gcc trunk fails, right? 
Could be a miscompile by GCC.
I'd suggest to find the guilty module somehow (e.g. build all modules w/ and
w/o asan and then mix them in different proportions until you have just 
one asan-ified module and FF still fails).

(I may not get to reproducing this myself any time soon, sorry)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/61475] Building Firefox with ASan is broken in the packaging step
  2014-06-11 12:43 [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step gk at torproject dot org
                   ` (5 preceding siblings ...)
  2014-06-16  8:11 ` kcc at gcc dot gnu.org
@ 2014-06-16  8:22 ` y.gribov at samsung dot com
  2014-06-24  8:51 ` gk at torproject dot org
  7 siblings, 0 replies; 9+ messages in thread
From: y.gribov at samsung dot com @ 2014-06-16  8:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61475

--- Comment #7 from Yury Gribov <y.gribov at samsung dot com> ---
Have you tried patch proposed in bug 61422?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/61475] Building Firefox with ASan is broken in the packaging step
  2014-06-11 12:43 [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step gk at torproject dot org
                   ` (6 preceding siblings ...)
  2014-06-16  8:22 ` y.gribov at samsung dot com
@ 2014-06-24  8:51 ` gk at torproject dot org
  7 siblings, 0 replies; 9+ messages in thread
From: gk at torproject dot org @ 2014-06-24  8:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61475

--- Comment #8 from Georg Koppen <gk at torproject dot org> ---
(In reply to Yury Gribov from comment #7)
> Have you tried patch proposed in bug 61422?

No, as it is not applying cleanly anymore.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-06-24  8:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-11 12:43 [Bug sanitizer/61475] New: Building Firefox with ASan is broken in the packaging step gk at torproject dot org
2014-06-11 12:45 ` [Bug sanitizer/61475] " kcc at gcc dot gnu.org
2014-06-11 12:55 ` y.gribov at samsung dot com
2014-06-11 13:09 ` gk at torproject dot org
2014-06-11 13:10 ` gk at torproject dot org
2014-06-12  7:04 ` gk at torproject dot org
2014-06-16  8:11 ` kcc at gcc dot gnu.org
2014-06-16  8:22 ` y.gribov at samsung dot com
2014-06-24  8:51 ` gk at torproject dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).