Bug 1059602 - Make libxul -> libmozsandbox dependency not a weak symbol. r=glandium
authorJed Davis <jld@mozilla.com>
Thu, 28 Aug 2014 23:23:13 -0700
changeset 202323 c36d4fc885d5893210e5c64b7a3bc65c06399450
parent 202322 5ffa67d71687c42275cbb231e7e96a33d1606f6d
child 202324 2074e9320edd4f32aa03d5a86780fcd76466d139
push id48394
push userjedavis@mozilla.com
push dateFri, 29 Aug 2014 06:25:49 +0000
treeherdermozilla-inbound@c36d4fc885d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1059602
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1059602 - Make libxul -> libmozsandbox dependency not a weak symbol. r=glandium MFBT_API is not the right macro for this; it changes the affected definition/usage to a weak symbol, for reasons explained in the comments on its definition. This was causing the linker to drop the dependency from libmozglue to libmozsandbox, in some cases (--as-needed, with a linker that doesn't consider weak symbols "needed"), and thus load libxul with gSandboxCrashFunc relocated to address 0 (the expected behavior of an unresolved weak symbol), which caused crashes when writing to it on startup.
security/sandbox/linux/SandboxInternal.h
--- a/security/sandbox/linux/SandboxInternal.h
+++ b/security/sandbox/linux/SandboxInternal.h
@@ -12,13 +12,13 @@
 
 #include <signal.h>
 
 #include "mozilla/Types.h"
 
 namespace mozilla {
 
 typedef void (*SandboxCrashFunc)(int, siginfo_t*, void*);
-extern MFBT_API SandboxCrashFunc gSandboxCrashFunc;
+extern MOZ_EXPORT SandboxCrashFunc gSandboxCrashFunc;
 
 } // namespace mozilla
 
 #endif // mozilla_SandboxInternal_h