Local Windows builds crash at startup because of VirtualProtextEx calling into je_free

RESOLVED INVALID

Status

()

Core
Memory Allocator
RESOLVED INVALID
3 years ago
3 years ago

People

(Reporter: Away for a while, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
I build using Visual Studio 2013 Community Edition with the following mozconfig:

. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-opt
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --enable-debug-symbols
ac_add_options --enable-warnings-as-errors

The resulting build crashes at startup like this:

mozglue.dll!je_free(void * ptr) Line 6459	C
[External Code]	
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
mozglue.dll!mozilla::internal::WindowsDllDetourPatcher::CreateTrampoline(void * aOrigFunction, int aDest, void * * aOutTramp) Line 658	C++
mozglue.dll!mozilla::internal::WindowsDllDetourPatcher::AddHook(const char * aName, int aHookDest, void * * aOrigFunc) Line 333	C++
mozglue.dll!mozilla::WindowsDllInterceptor::AddDetour(const char * aName, int aHookDest, void * * aOrigFunc) Line 760	C++
mozglue.dll!DllBlocklist_Initialize() Line 716	C++
[External Code]

I think this is because we're screwing up <http://mxr.mozilla.org/mozilla-central/source/mozglue/crt/Makefile.in#39>, but dmajor disagrees.  I put a heap dump of the crashed process up on <http://people.mozilla.org/~eakhgari/firefox.dmp>.
(Reporter)

Comment 1

3 years ago
Turns out that this was happening because of the patch for bug 1147242 which I had in my queue...
Blocks: 1147242
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
I imported your patch and I don't crash. I'd still be interested in debugging your minidump if you can provide symbols.
Flags: needinfo?(ehsan)
(Reporter)

Comment 3

3 years ago
OK, I'll ping you on IRC.
Flags: needinfo?(ehsan)
IRC recap: The patch on this bug is incomplete. The more complete patch in Ehsan's queue does reproduce this crash on my machine. The core issue is that something is pulling malloc into firefox.exe, which hits the problem in bug 1023941 comment 32.
I've spent longer than I can really afford to, trying to make this work. At this point I have to agree that we shouldn't bother with bug 1147242.
You need to log in before you can comment on or make changes to this bug.