STL headers undefine the mozalloc free and such

NEW
Unassigned

Status

()

Core
XPCOM
7 years ago
7 years ago

People

(Reporter: bz, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

In particular, they include string16.h, which includes <string> which at least on my mac nukes those defines.

Updated

7 years ago
Component: XPCOM → IPC
QA Contact: xpcom → ipc
This doesn't affect 4.0 because
 - malloc et al. are #define'd to their fallible variants
 - we use jemalloc on windows so heap mismatches aren't a problem

Post-4.0, we'll want to fix this because we might want to have allocation-tracking hooks in mozalloc.  It's also a potential danger for new code running on non-libxul windows that might hand out malloc'd pointers to other dlls, since with mozalloc, malloc et al. have been spec'd to make that kosher.

<cstdlib> in gcc 4.4's STL undef's malloc et al.  I see some uses of libc malloc in my linux tree.  (Output edited.)  The libs annotated BAD are not expected to use libc malloc.  "???" I'm not sure.  Unannotated is expected.

$ find -name '*.a' -exec echo {} \; -exec nm -u {} \; | egrep -e '(U malloc|.*\.a)' | uniq
BAD ./docshell/build/libdocshell.a
                 U malloc
BAD ./parser/htmlparser/src/libhtmlpars.a
                 U malloc
??? ./parser/expat/lib/libmozexpat_s.a
                 U malloc
./media/libogg/src/libogg.a
                 U malloc
./media/libtheora/lib/libtheora.a
                 U malloc
./media/libsydneyaudio/src/libsydneyaudio.a
                 U malloc
./media/libvpx/libvpx.a
                 U malloc
./media/libnestegg/src/libnestegg.a
                 U malloc
./media/libvorbis/lib/libvorbis.a
                 U malloc
./nsprpub/pr/src/libnspr4.a
                 U malloc
./nsprpub/lib/libc/src/libplc4.a
                 U malloc
??? ./xpcom/glue/standalone/libxpcomglue.a
                 U malloc
./xpcom/glue/nomozalloc/libxpcomglue_s_nomozalloc.a
                 U malloc
BAD ./layout/build/libgklayout.a
                 U malloc
BAD ./js/jetpack/libjetpack_s.a
                 U malloc
./js/src/editline/libeditline.a
                 U malloc
??? ./js/src/xpconnect/wrappers/libxpcwrappers_s.a
                 U malloc
??? ./js/src/xpconnect/src/libxpconnect_s.a
                 U malloc
./js/src/libjs_static.a
                 U malloc
./js/jsd/libjsd.a
                 U malloc
??? ./extensions/spellcheck/src/libspellchecker.a
                 U malloc
./extensions/spellcheck/hunspell/src/libhunspell_s.a
                 U malloc
BAD ./uriloader/exthandler/libexthandler_s.a
                 U malloc
./gfx/harfbuzz/src/libmozharfbuzz.a
                 U malloc
./gfx/cairo/libpixman/src/libmozlibpixman.a
                 U malloc
./gfx/cairo/cairo/src/libmozcairo.a
                 U malloc
./gfx/angle/libangle.a
                 U malloc
./gfx/qcms/libmozqcms.a
                 U malloc
./nss/softokn/libsoftokn.a
                 U malloc
./nss/dbm/libdbm.a
                 U malloc
./toolkit/crashreporter/google-breakpad/src/client/linux/handler/libexception_handler_s.a
                 U malloc
BAD ./toolkit/xre/libxulapp_s.a
                 U malloc
./widget/src/xremoteclient/libxremote_client_s.a
                 U malloc
./ipc/chromium/libchromium_s.a
                 U malloc
BAD ./netwerk/build/libnecko.a
                 U malloc
??? ./netwerk/protocol/http/libnkhttp_s.a
                 U malloc
BAD ./netwerk/base/src/libneckobase_s.a
                 U malloc
./jpeg/libmozjpeg.a
                 U malloc
./modules/libreg/standalone/libmozregsa_s.a
                 U malloc
./modules/libimg/png/libmozpng.a
                 U malloc
??? ./modules/libpr0n/decoders/libimgdecoders_s.a
                 U malloc
BAD ./modules/libpr0n/build/libimglib2.a
                 U malloc
./modules/libbz2/src/libbz2.a
                 U malloc
./modules/libbz2/src/libhostbz2.a
                 U malloc
./modules/zlib/src/libmozz.a
                 U malloc
./modules/zlib/standalone/libmozz_s.a
                 U malloc
./modules/libmar/src/libmar.a
                 U malloc
./modules/libmar/src/libhostmar.a
                 U malloc
Not an IPC thing, but STL.  I'm still the right guy for this bug.
Assignee: jones.chris.g → nobody
Component: IPC → XPCOM
QA Contact: ipc → xpcom
Summary: IPC headers undefine the mozalloc free and such → STL headers undefine the mozalloc free and such
You need to log in before you can comment on or make changes to this bug.