Closed Bug 1353752 Opened 3 years ago Closed 3 years ago

Firefox fails to be build with jemalloc4

Categories

(Core :: Memory Allocator, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: Alex_Gaynor, Assigned: Alex_Gaynor)

References

Details

Attachments

(1 file)

Steps to reproduce (this is going to be embarrassing if I was doing this wrong!):

1. Add `ac_add_options --enable-jemalloc=4` to your mozconfig.
2. ./mach build

Result:

 0:27.93 Undefined symbols for architecture x86_64:
 0:27.93   "__malloc_postfork_child", referenced from:
 0:27.93       _zone_force_unlock in zone.o
 0:27.93       _zone_reinit_lock in zone.o
 0:27.93   "__malloc_prefork", referenced from:
 0:27.93       _zone_force_lock in zone.o
 0:27.93 ld: symbol(s) not found for architecture x86_64
 0:27.93 clang: error: linker command failed with exit code 1 (use -v to see invocation)



The problem appears to have been introduced in https://hg.mozilla.org/mozilla-central/rev/516551993d16 -- I didn't bisect to confirm this, but it introduced the usage of the symbols which don't exist in jemalloc4, so it's a fair bet.
I pushed up a review request that locally _appears_ to work for me (by which I mean firefox builds, and some casual browsing works fine).

I don't really have any confidence it is correct, but hopefully it's a jumping off point to getting this resolved.
Attachment #8854888 - Flags: review?(mh+mozilla)
Comment on attachment 8854888 [details]
Bug 1353752 - Fixed building with jemalloc4

https://reviewboard.mozilla.org/r/126834/#review129554

::: memory/build/zone.c:239
(Diff revision 1)
>  static void
>  zone_log(malloc_zone_t *zone, void *address)
>  {
>  }
>  
> -#ifdef MOZ_JEMALLOC
> +#if defined(MOZ_JEMALLOC) || defined(MOZ_JEMALLOC4)

`#ifdef MOZ_JEMALLOC4` should be enough. `MOZ_JEMALLOC` is just an old name, predating bug 804303 and bug 1201792.
Assignee: nobody → agaynor
Duplicate of this bug: 1343441
Comment on attachment 8854888 [details]
Bug 1353752 - Fixed building with jemalloc4

https://reviewboard.mozilla.org/r/126834/#review129692
Attachment #8854888 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/af3e60d8e4dc
Fixed building with jemalloc4 r=glandium
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/af3e60d8e4dc
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.