Bug 1395032 - Remove remainder of the VS CRT allocator mismatch hack. r?gps draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 30 Aug 2017 14:06:13 +0900
changeset 655538 ddc76db5dead6dac53ad6d2ac998b9583dc0ccf0
parent 655385 db7f19e26e571ae1dd309f5d2f387b06ba670c30
child 655569 b03295500a34e9badbe1eab6b86d67e1229cd6db
push id76907
push userbmo:mh+mozilla@glandium.org
push dateWed, 30 Aug 2017 05:09:03 +0000
reviewersgps
bugs1395032, 1186064
milestone57.0a1
Bug 1395032 - Remove remainder of the VS CRT allocator mismatch hack. r?gps Bug 1186064 removed most of it when we started requiring VS 2015u2, but the "frex" function exported through mozglue.def.in was only used through the MSVCRT being patched by fixcrt.py, which is not done anymore. So the "frex" export is not used anymore, and so the "dumb_free_thunk" function is not used anymore as well.
memory/build/mozmemory_wrap.c
mozglue/build/mozglue.def.in
--- a/memory/build/mozmemory_wrap.c
+++ b/memory/build/mozmemory_wrap.c
@@ -136,27 +136,16 @@ asprintf_impl(char **str, const char *fm
 
    va_end(ap);
 
    return ret;
 }
 #endif
 
 #ifdef XP_WIN
-/*
- *  There's a fun allocator mismatch in (at least) the VS 2010 CRT
- *  (see the giant comment in $(topsrcdir)/mozglue/build/Makefile.in)
- *  that gets redirected here to avoid a crash on shutdown.
- */
-void
-dumb_free_thunk(void *ptr)
-{
-  return; /* shutdown leaks that we don't care about */
-}
-
 #include <wchar.h>
 
 /*
  *  We also need to provide our own impl of wcsdup so that we don't ask
  *  the CRT for memory from its heap (which will then be unfreeable).
  */
 wchar_t *
 wcsdup_impl(const wchar_t *src)
--- a/mozglue/build/mozglue.def.in
+++ b/mozglue/build/mozglue.def.in
@@ -30,11 +30,9 @@ EXPORTS
   strndup=wrap_strndup
   strdup=wrap_strdup
   _strdup=wrap_strdup
   wcsdup=wrap_wcsdup
   _wcsdup=wrap_wcsdup
   jemalloc_stats
   jemalloc_free_dirty_pages
   jemalloc_thread_local_arena
-  ; A hack to work around the CRT (see giant comment in Makefile.in)
-  frex=dumb_free_thunk
 #endif