Closed Bug 999496 Opened 10 years ago Closed 10 years ago

Error with gcc 4.9: undefined reference to mozilla::AudioQueueMemoryFunctor::MallocSizeOfBuild

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: bjackson0971, Assigned: sxw)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20140421152514

Steps to reproduce:

Compiling trunk builds with gcc 4.9RC was working for a while, and then started giving an undefined reference error. Builds still work with gcc 4.8.2, but are still broken with the gcc 4.9.0 release. It it not clear if this is a Firefox or gcc bug.


Actual results:

../../../content/media/Unified_cpp_content_media1.o: In function `mozilla::AudioData::SizeOfIncludingThis(unsigned long (*)(void const*)) const':
/home/brad/projects/mozilla/content/media/MediaData.h:86: undefined reference to `mozilla::AudioQueueMemoryFunctor::MallocSizeOf(void const*)'
/bin/ld: ../../../content/media/Unified_cpp_content_media1.o: relocation R_X86_64_PC32 against undefined symbol `_ZN7mozilla23AudioQueueMemoryFunctor12MallocSizeOfEPKv' can not be used when making a shared object; recompile with -fPIC
/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status


Expected results:

Build should complete
Component: Untriaged → Video/Audio
Product: Firefox → Core
I got the same error. What would happen if we do what the error messages "recompile with -fPIC" suggests? I am just investigating on how the build system works to test that out...
That's usually a red herring in my experience. It's almost always a symbol visibility issue.
I can get the link to complete without error if I move AudioData::SizeOfIncludingThis out of MediaData.h and into MediaData.cpp, like VideoData::SizeOfIncludingThis is currently. Firefox seg faults on startup, but that could be another problem.
Backtrace of crash on startup. Does not crash in safe mode, but still crashes with all plugins/addons disabled without safe mode.

#0  mozilla::detail::GuardObjectNotificationReceiver::~GuardObjectNotificationReceiver (this=0x349, __in_chrg=<optimized out>)
    at ../../dist/include/mozilla/GuardObjects.h:102
#1  0x00007ffff41323cc in ~AutoValueVector (this=0x2c0, 
    __in_chrg=<optimized out>) at /home/bsjacks/mozilla/js/src/jsapi.h:499
#2  js::jit::BailoutIonToBaseline (cx=cx@entry=0x7ffff7df7560, 
    activation=activation@entry=0x7fffffff4a80, iter=..., 
    invalidate=invalidate@entry=false, bailoutInfo=bailoutInfo@entry=
    0x7fffffff4728, excInfo=excInfo@entry=0x0)
    at /home/bsjacks/mozilla/js/src/jit/BaselineBailouts.cpp:1339
#3  0x00007ffff413268f in js::jit::Bailout (sp=0x7fffffff4730, bailoutInfo=
    0x7fffffff4728) at /home/bsjacks/mozilla/js/src/jit/Bailouts.cpp:91
#4  0x00007ffff7fe6331 in ?? ()
#5  0x00007fffffff4730 in ?? ()
#6  0x00007fffffff4728 in ?? ()
#7  0x00007fffffff4750 in ?? ()
#8  0x0000000000000000 in ?? ()
Attached patch 999496.patch (obsolete) — Splinter Review
@Brad: I summarized your previous comment in the attached path. Here it worked fine and my browser does not crash.
Can we get this patch reviewed and committed?
Comment on attachment 8422385 [details] [diff] [review]
999496.patch

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

It helps if you ask someone for review, otherwise you're relying on a reviewer spotting the bug. :-)
Attachment #8422385 - Flags: review+
Attachment #8422385 - Attachment is obsolete: true
Assignee: nobody → kinetik
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
inbound is closed, so marked for later landing.
Assignee: kinetik → sxw
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1f10a8067853
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
@Matthew Thanks. And: I know, I should really read the docs on how to submit patches...
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: