This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gcov-profile/55650] New: [4.8 Regression] Firefox profiledbuild: libxul.so: cannot map zero-fill pages: Cannot allocate memory


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55650

             Bug #: 55650
           Summary: [4.8 Regression] Firefox profiledbuild:  libxul.so:
                    cannot map zero-fill pages: Cannot allocate memory
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: markus@trippelsdorf.de


Building Firefox with:
make -f client.mk profiledbuild

Results in:
...
/var/tmp/moz-build-dir/dist/bin/xpcshell: error while loading shared libraries:
libxul.so: cannot map zero-fill pages: Cannot allocate memory
make[4]: *** [prepare-package] Error 127

 % readelf -lSW ./libxul.so
There are 41 section headers, starting at offset 0x103e7f10:
Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg
Lk Inf Al
...
  [28] .bss              NOBITS          000000000bfaabe0 bfa9be0 80186ae8c 00 
WA  0   0 32

Adding Wl,-Map,libxul.map when linking libxul shows:
...
 .bss..LPBX1    0x000000000ccb3be0 0x800000000
/var/tmp/moz-build-dir/toolkit/library/../components/protobuf/once.i_o
....

Reducing once.cpp leads to:

 % cat test.ii
class A
{
    virtual void Run ();
};
class B:public A
{
public:
    B ();
    void Run ()
    {
    }
};
void *operator     new (unsigned long)
__attribute__ ((__externally_visible__));
void *moz_xmalloc ();
inline void *operator
new (unsigned long)
{
    return moz_xmalloc ();
}

inline A *
NewCallback ()
{
    return new B;
}

 % c++ -c -fprofile-generate -fdata-sections -O2 test.ii
 % readelf -lSW ./test.o | grep "800000000"
  [11] .bss..LPBX1       NOBITS          0000000000000000 000120 800000000 00 
WA  0   0 32


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]